^ openai - added 'gpt-4o-mini' and switched all openai examples/tests to it

This commit is contained in:
Jeremy Chone
2024-07-18 15:03:39 -07:00
parent a0d812110e
commit dfeeb7e463
3 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@
## 2024-07-18 - `0.1.3`
- `^` **openai** - added `gpt-4o-mini` and switched all openai examples/tests to it
- `!` **API CHANGE** - New `MessageContent` type for `ChatMessage.content`, `ChatResponse.content`, and `StreamEnd.captured_content` (only ::Text variant for now).
- This is in preparation for multi-part message (i.e. multi-modal)
- `!` **API CHANGE** - (should be minor, as `Into` implemented) - `ChatMessage` now takes `MessageContent` with only `::Text(String)` variant for now.

View File

@ -34,7 +34,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

@ -17,7 +17,7 @@ use std::sync::OnceLock;
pub struct OpenAIAdapter;
const BASE_URL: &str = "https://api.openai.com/v1/";
const MODELS: &[&str] = &["gpt-4o", "gpt-4-turbo", "gpt-4", "gpt-3.5-turbo"];
const MODELS: &[&str] = &["gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-4", "gpt-3.5-turbo"];
impl Adapter for OpenAIAdapter {
/// Note: For now returns the common ones (see above)