Skip to content

Commit cd18465

Browse files
committed
add Send and Sync traits to Model
1 parent b28adcc commit cd18465

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/llm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub trait ModelFactory: Model + Sized {
2828

2929
/// Defines the required functionality
3030
/// to interact with a language model.
31-
pub trait Model {
31+
pub trait Model: Send + Sync {
3232
fn get_name(&self) -> String;
3333
fn prompt(&self, input: &str) -> Result<String, LLMError>;
3434
}

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use parrot::llm::get_available_models;
22

33
fn main() {
44
let available_models = get_available_models().expect("failed to get models");
5+
56
available_models.iter().for_each(|m| {
67
let out = m
78
.prompt("say hello to my friends")

0 commit comments

Comments
 (0)