We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b28adcc commit cd18465Copy full SHA for cd18465
2 files changed
src/llm/mod.rs
@@ -28,7 +28,7 @@ pub trait ModelFactory: Model + Sized {
28
29
/// Defines the required functionality
30
/// to interact with a language model.
31
-pub trait Model {
+pub trait Model: Send + Sync {
32
fn get_name(&self) -> String;
33
fn prompt(&self, input: &str) -> Result<String, LLMError>;
34
}
src/main.rs
@@ -2,6 +2,7 @@ use parrot::llm::get_available_models;
2
3
fn main() {
4
let available_models = get_available_models().expect("failed to get models");
5
+
6
available_models.iter().for_each(|m| {
7
let out = m
8
.prompt("say hello to my friends")
0 commit comments