Enum llm_chain_openai::chatgpt::Model
source · #[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 PartialEq<Model> for Model
impl PartialEq<Model> for Model
source§impl ToString for Model
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 StructuralEq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.