llmclient 0.2.0

Rust LLM client - Gemini, GPT, Claude, Mistral, Groq
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
    #[tokio::test]
    async fn test_call_groq_dialogue() {
        let system = "Use a Scottish accent to answer questions";
        let mut messages = 
            vec!["How many brains does an octopus have, when they have been injured and lost a leg?".to_string()];
        let res = GroqCompletion::call(&system, &messages, 0.2, false, true).await;
        println!("{res:?}");

        messages.push(res.unwrap().to_string());
        messages.push("Is a cuttle fish similar?".to_string());

        let res = GroqCompletion::call(&system, &messages, 0.2, false, true).await;
        println!("{res:?}");
    }