pub enum OpenAIModel {
Show 13 variants
Gpt5ChatLatest,
Gpt5Pro,
Gpt5,
Gpt5Mini,
Gpt4O,
Gpt4OMini,
Gpt4Turbo,
Gpt4,
Gpt35Turbo,
O1,
O1Mini,
O1Pro,
Custom(String),
}Expand description
OpenAI models available for completion
For the latest available models and their identifiers, check the OpenAI Models Documentation.
§Using Custom Models
You can specify any model name as a string using Custom variant or FromStr:
use rstructor::OpenAIModel;
use std::str::FromStr;
// Using Custom variant
let model = OpenAIModel::Custom("gpt-4-custom".to_string());
// Using FromStr (useful for config files)
let model = OpenAIModel::from_str("gpt-4-custom").unwrap();
// Or use the convenience method
let model = OpenAIModel::from_string("gpt-4-custom");Variants§
Gpt5ChatLatest
GPT-5 Chat Latest (latest GPT-5 model for chat)
Gpt5Pro
GPT-5 Pro (most capable GPT-5 model)
Gpt5
GPT-5 (standard GPT-5 model)
Gpt5Mini
GPT-5 Mini (smaller, faster GPT-5 model)
Gpt4O
GPT-4o (latest GPT-4 model, optimized for chat)
Gpt4OMini
GPT-4o Mini (smaller, faster, more cost-effective version)
Gpt4Turbo
GPT-4 Turbo (high-intelligence model)
Gpt4
GPT-4 (standard GPT-4 model)
Gpt35Turbo
GPT-3.5 Turbo (efficient model for simple tasks)
O1
O1 (reasoning model optimized for complex problem-solving)
O1Mini
O1 Mini (smaller reasoning model)
O1Pro
O1 Pro (most capable reasoning model)
Custom(String)
Custom model name (for new models, local LLMs, or OpenAI-compatible endpoints)
Implementations§
Trait Implementations§
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.