! add ChatRequestOption and upgraded the client exec_chat and adapters APIs

This commit is contained in:
Jeremy Chone
2024-06-09 20:34:09 -07:00
parent 1cc7dd7b5d
commit cb2a4a0256
16 changed files with 122 additions and 36 deletions

View File

@@ -38,7 +38,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
chat_req = chat_req.append_message(ChatMessage::user(question));
println!("\n--- Question:\n{question}");
let chat_res = client.exec_chat_stream(MODEL, chat_req.clone()).await?;
let chat_res = client.exec_chat_stream(MODEL, chat_req.clone(), None).await?;
println!("\n--- Answer: (streaming)");
let assistant_answer = print_chat_stream(chat_res).await?;