mirror of
https://github.com/mii443/rust-genai.git
synced 2025-08-22 16:25:27 +00:00
. update tests and examples from to 'gpt-4o-mini' (was 'gpt-3.5-turbo')
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
|
||||
## ... - `0.1.4`
|
||||
|
||||
- `-` Fix naming `ClientConfig::with_adapter_kind_resolver`
|
||||
- `-` Fix naming `ClientConfig::with_adapter_kind_resolver` (was wrongly `...auth_resolver`)
|
||||
|
||||
## 2024-07-18 - `0.1.3`
|
||||
|
||||
|
@ -84,7 +84,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
continue;
|
||||
}
|
||||
|
||||
let adapter_kind = client.resolve_adapter_kind(model)?;
|
||||
let adapter_kind = client.resolve_model_info(model)?.adapter_kind;
|
||||
|
||||
println!("\n===== MODEL: {model} ({adapter_kind}) =====");
|
||||
|
||||
@ -92,7 +92,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
println!("\n--- Answer:");
|
||||
let chat_res = client.exec_chat(model, chat_req.clone(), None).await?;
|
||||
println!("{}", chat_res.content.as_deref().unwrap_or("NO ANSWER"));
|
||||
println!("{}", chat_res.content_text_as_str().unwrap_or("NO ANSWER"));
|
||||
|
||||
println!("\n--- Answer: (streaming)");
|
||||
let chat_res = client.exec_chat_stream(model, chat_req.clone(), None).await?;
|
||||
|
@ -2,7 +2,7 @@ use genai::chat::{ChatMessage, ChatRequest};
|
||||
use genai::utils::{print_chat_stream, PrintChatStreamOptions};
|
||||
use genai::Client;
|
||||
|
||||
const MODEL_OPENAI: &str = "gpt-3.5-turbo";
|
||||
const MODEL_OPENAI: &str = "gpt-4o-mini";
|
||||
const MODEL_ANTHROPIC: &str = "claude-3-haiku-20240307";
|
||||
const MODEL_COHERE: &str = "command-light";
|
||||
const MODEL_GEMINI: &str = "gemini-1.5-flash-latest";
|
||||
|
@ -2,7 +2,7 @@ use genai::chat::{ChatMessage, ChatRequest};
|
||||
use genai::utils::print_chat_stream;
|
||||
use genai::Client;
|
||||
|
||||
const MODEL: &str = "gpt-3.5-turbo";
|
||||
const MODEL: &str = "gpt-4o-mini";
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
@ -5,7 +5,7 @@ use genai::utils::print_chat_stream;
|
||||
use genai::Client;
|
||||
use genai::ConfigSet;
|
||||
|
||||
const MODEL: &str = "gpt-3.5-turbo";
|
||||
const MODEL: &str = "gpt-4o-mini";
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
@ -4,7 +4,7 @@ use genai::resolver::AdapterKindResolver;
|
||||
use genai::utils::print_chat_stream;
|
||||
use genai::{Client, ClientConfig};
|
||||
|
||||
const MODEL: &str = "gpt-3.5-turbo";
|
||||
const MODEL: &str = "gpt-4o-mini";
|
||||
|
||||
/// This example shows how to use a custom AdapterKindResolver to have some custom
|
||||
/// mapping from a model name to a AdapterKind.
|
||||
|
@ -2,7 +2,7 @@ use genai::chat::{ChatMessage, ChatRequest, ChatRequestOptions};
|
||||
use genai::utils::print_chat_stream;
|
||||
use genai::{Client, ClientConfig};
|
||||
|
||||
// const MODEL: &str = "gpt-3.5-turbo";
|
||||
// const MODEL: &str = "gpt-4o-mini";
|
||||
// const MODEL: &str = "command-light";
|
||||
// const MODEL: &str = "claude-3-haiku-20240307";
|
||||
// const MODEL: &str = "gemini-1.5-flash-latest";
|
||||
|
@ -4,7 +4,7 @@ use crate::support::common_tests;
|
||||
|
||||
type Result<T> = core::result::Result<T, Box<dyn std::error::Error>>; // For tests.
|
||||
|
||||
const MODEL: &str = "gpt-3.5-turbo";
|
||||
const MODEL: &str = "gpt-4o-mini";
|
||||
|
||||
// region: --- Chat
|
||||
|
||||
|
Reference in New Issue
Block a user