#[non_exhaustive]pub enum Model {
Gpt35Turbo,
Gpt35Turbo0301,
Gpt4,
Gpt4_0314,
Gpt4_32k,
Gpt4_32k0314,
Other(String),
}
Expand description
The Model
enum represents the available ChatGPT models that you can use through the OpenAI
API.
These models have different capabilities and performance characteristics, allowing you to choose the one that best suits your needs. See https://platform.openai.com/docs/models for more information.
§Example
use llm_chain_openai::chatgpt::Model;
let turbo_model = Model::Gpt35Turbo;
let custom_model = Model::Other("your_custom_model_name".to_string());
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Gpt35Turbo
A high-performance and versatile model that offers a great balance of speed, quality, and affordability.
Gpt35Turbo0301
Snapshot of gpt-3.5-turbo from March 1st 2023. Unlike gpt-3.5-turbo, this model will not receive updates, and will be deprecated 3 months after a new version is released.
Gpt4
A high-performance model that offers the best quality, but is slower and more expensive than
the ChatGPT3_5Turbo
model.
Gpt4_0314
Snapshot of gpt-4 from March 14th 2023. Unlike gpt-4, this model will not receive updates, and will be deprecated 3 months after a new version is released.
Gpt4_32k
Same capabilities as the base gpt-4 mode but with 4x the context length. Will be updated with our latest model iteration.
Gpt4_32k0314
Snapshot of gpt-4-32 from March 14th 2023. Unlike gpt-4-32k, this model will not receive updates, and will be deprecated 3 months after a new version is released.
Other(String)
A variant that allows you to specify a custom model name as a string, in case new models are introduced or you have access to specialized models.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl ToString for Model
The Model
enum implements the ToString
trait, allowing you to easily convert it to a string.
impl ToString for Model
The Model
enum implements the ToString
trait, allowing you to easily convert it to a string.
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.