. update tests and examples from to 'gpt-4o-mini' (was 'gpt-3.5-turbo')

This commit is contained in:
Jeremy Chone
2024-07-19 16:19:43 -07:00
parent 9977ea527d
commit f9b54f3d16
8 changed files with 9 additions and 9 deletions

View File

@ -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`

View File

@ -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?;

View File

@ -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";

View File

@ -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>> {

View File

@ -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>> {

View File

@ -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.

View File

@ -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";

View File

@ -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