Enum Model

Source
pub enum Model {
Show 73 variants Gpt45Preview, Gpt45Preview2025_02_27, Gpt4oMiniAudioPreview, Gpt4oMiniAudioPreview2024_12_17, Gpt4oMiniRealtimePreview, DallE2, Gpt4o2024_11_20, O1Mini2024_09_12, O1Preview2024_09_12, O1Mini, O1Preview, ChatGpt4oLatest, Whisper1, DallE3, Gpt4Turbo, Gpt4TurboPreview, Gpt4oAudioPreview, Gpt4oAudioPreview2024_10_01, Babbage002, OmniModerationLatest, OmniModeration2024_09_26, Tts1Hd1106, Gpt4o2024_08_06, Gpt4o, Gpt4o2024_05_13, Tts1Hd, Gpt4Turbo2024_04_09, Tts1, Gpt3_5Turbo16k, Tts1_1106, Davinci002, Gpt3_5Turbo1106, Gpt4oMiniRealtimePreview2024_12_17, Gpt3_5TurboInstruct, Gpt4oRealtimePreview2024_10_01, Gpt3_5TurboInstruct0914, Gpt3_5Turbo0125, Gpt4oAudioPreview2024_12_17, Gpt4oRealtimePreview2024_12_17, Gpt3_5Turbo, TextEmbedding3Large, Gpt4oRealtimePreview, TextEmbedding3Small, Gpt40125Preview, Gpt4, TextEmbeddingAda002, Gpt40106Preview, Gpt4oMini, Gpt40613, Gpt4oMini2024_07_18, Gpt41Nano, Gpt41Nano2025_04_14, Gpt41Mini, Gpt41Mini2025_04_14, Gpt41, Gpt41_2025_04_14, Gpt4oMiniSearchPreview, Gpt4oMiniSearchPreview2025_03_11, Gpt4oSearchPreview, Gpt4oSearchPreview2025_03_11, Gpt4oMiniTts, Gpt4oMiniTranscribe, Gpt4oTranscribe, GptImage1, O12024_12_17, O1, O1Pro, O1Pro2025_03_19, O3Mini, O3Mini2025_01_31, O4Mini, O4Mini2025_04_16, Other(String),
}
Expand description

An enum representing known OpenAI model identifiers, plus an Other variant for unrecognized or custom model IDs.

  • Gpt4oMiniAudioPreview => "gpt-4o-mini-audio-preview"
  • DallE2 => "dall-e-2"
  • etc.

We manually implement Serialize/Deserialize so that known variants map exactly to the expected strings, and all unknown strings map to Other(String).

Variants§

§

Gpt45Preview

The gpt-4.5-preview model (owned by system)

§

Gpt45Preview2025_02_27

The gpt-4.5-preview-2025-02-27 model (owned by system)

§

Gpt4oMiniAudioPreview

The gpt-4o-mini-audio-preview model (owned by system).

§

Gpt4oMiniAudioPreview2024_12_17

The gpt-4o-mini-audio-preview-2024-12-17 model (owned by system).

§

Gpt4oMiniRealtimePreview

The gpt-4o-mini-realtime-preview model (owned by system).

§

DallE2

The dall-e-2 model (owned by system).

§

Gpt4o2024_11_20

The gpt-4o-2024-11-20 model (owned by system).

§

O1Mini2024_09_12

The o1-mini-2024-09-12 model (owned by system).

§

O1Preview2024_09_12

The o1-preview-2024-09-12 model (owned by system).

§

O1Mini

The o1-mini model (owned by system).

§

O1Preview

The o1-preview model (owned by system).

§

ChatGpt4oLatest

The chatgpt-4o-latest model (owned by system).

§

Whisper1

The whisper-1 model (owned by openai-internal).

§

DallE3

The dall-e-3 model (owned by system).

§

Gpt4Turbo

The gpt-4-turbo model (owned by system).

§

Gpt4TurboPreview

The gpt-4-turbo-preview model (owned by system).

§

Gpt4oAudioPreview

The gpt-4o-audio-preview model (owned by system).

§

Gpt4oAudioPreview2024_10_01

The gpt-4o-audio-preview-2024-10-01 model (owned by system).

§

Babbage002

The babbage-002 model (owned by system).

§

OmniModerationLatest

The omni-moderation-latest model (owned by system).

§

OmniModeration2024_09_26

The omni-moderation-2024-09-26 model (owned by system).

§

Tts1Hd1106

The tts-1-hd-1106 model (owned by system).

§

Gpt4o2024_08_06

The gpt-4o-2024-08-06 model (owned by system).

§

Gpt4o

The gpt-4o model (owned by system).

§

Gpt4o2024_05_13

The gpt-4o-2024-05-13 model (owned by system).

§

Tts1Hd

The tts-1-hd model (owned by system).

§

Gpt4Turbo2024_04_09

The gpt-4-turbo-2024-04-09 model (owned by system).

§

Tts1

The tts-1 model (owned by openai-internal).

§

Gpt3_5Turbo16k

The gpt-3.5-turbo-16k model (owned by openai-internal).

§

Tts1_1106

The tts-1-1106 model (owned by system).

§

Davinci002

The davinci-002 model (owned by system).

§

Gpt3_5Turbo1106

The gpt-3.5-turbo-1106 model (owned by system).

§

Gpt4oMiniRealtimePreview2024_12_17

The gpt-4o-mini-realtime-preview-2024-12-17 model (owned by system).

§

Gpt3_5TurboInstruct

The gpt-3.5-turbo-instruct model (owned by system).

§

Gpt4oRealtimePreview2024_10_01

The gpt-4o-realtime-preview-2024-10-01 model (owned by system).

§

Gpt3_5TurboInstruct0914

The gpt-3.5-turbo-instruct-0914 model (owned by system).

§

Gpt3_5Turbo0125

The gpt-3.5-turbo-0125 model (owned by system).

§

Gpt4oAudioPreview2024_12_17

The gpt-4o-audio-preview-2024-12-17 model (owned by system).

§

Gpt4oRealtimePreview2024_12_17

The gpt-4o-realtime-preview-2024-12-17 model (owned by system).

§

Gpt3_5Turbo

The gpt-3.5-turbo model (owned by openai).

§

TextEmbedding3Large

The text-embedding-3-large model (owned by system).

§

Gpt4oRealtimePreview

The gpt-4o-realtime-preview model (owned by system).

§

TextEmbedding3Small

The text-embedding-3-small model (owned by system).

§

Gpt40125Preview

The gpt-4-0125-preview model (owned by system).

§

Gpt4

The gpt-4 model (owned by openai).

§

TextEmbeddingAda002

The text-embedding-ada-002 model (owned by openai-internal).

§

Gpt40106Preview

The gpt-4-1106-preview model (owned by system).

§

Gpt4oMini

The gpt-4o-mini model (owned by system).

§

Gpt40613

The gpt-4-0613 model (owned by openai).

§

Gpt4oMini2024_07_18

The gpt-4o-mini-2024-07-18 model (owned by system).

§

Gpt41Nano

The gpt-4.1-nano model (owned by system).

§

Gpt41Nano2025_04_14

The gpt-4.1-nano-2025-04-14 model (owned by system).

§

Gpt41Mini

The gpt-4.1-mini model (owned by system).

§

Gpt41Mini2025_04_14

The gpt-4.1-mini-2025-04-14 model (owned by system).

§

Gpt41

The gpt-4.1 model (owned by system).

§

Gpt41_2025_04_14

The gpt-4.1-2025-04-14 model (owned by system).

§

Gpt4oMiniSearchPreview

The gpt-4o-mini-search-preview model (owned by system).

§

Gpt4oMiniSearchPreview2025_03_11

The gpt-4o-mini-search-preview-2025-03-11 model (owned by system).

§

Gpt4oSearchPreview

The gpt-4o-search-preview model (owned by system).

§

Gpt4oSearchPreview2025_03_11

The gpt-4o-search-preview-2025-03-11 model (owned by system).

§

Gpt4oMiniTts

The gpt-4o-mini-tts model (owned by system).

§

Gpt4oMiniTranscribe

The gpt-4o-mini-transcribe model (owned by system).

§

Gpt4oTranscribe

The gpt-4o-transcribe model (owned by system).

§

GptImage1

The gpt-image-1 model (owned by system).

§

O12024_12_17

The o1-2024-12-17 model (owned by system).

§

O1

The o1 model (owned by system).

§

O1Pro

The o1-pro model (owned by system).

§

O1Pro2025_03_19

The o1-pro-2025-03-19 model (owned by system).

§

O3Mini

The o3-mini model (owned by system).

§

O3Mini2025_01_31

The o3-mini-2025-01-31 model (owned by system).

§

O4Mini

The o4-mini model (owned by system).

§

O4Mini2025_04_16

The o4-mini-2025-04-16 model (owned by system).

§

Other(String)

A catch-all for unknown or future model names.

Implementations§

Source§

impl Model

Source

pub fn as_str(&self) -> &str

Returns the string identifier (e.g. "gpt-4o-mini-audio-preview") associated with this Model variant.

Trait Implementations§

Source§

impl Clone for Model

Source§

fn clone(&self) -> Model

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Model

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Model

Source§

fn default() -> Model

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Model

Source§

fn deserialize<D>(deserializer: D) -> Result<Model, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&String> for Model

Source§

fn from(s: &String) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for Model

Source§

fn from(s: &str) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Model

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Model

Source§

fn eq(&self, other: &Model) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Model

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,