Trait OpenAiModelTrait

Source
pub trait OpenAiModelTrait {
    // Required method
    fn model(&mut self) -> &mut ApiLlmModel;

    // Provided methods
    fn model_id_str(self, model_id: &str) -> Self
       where Self: Sized { ... }
    fn gpt_4(self) -> Self
       where Self: Sized { ... }
    fn gpt_4_32k(self) -> Self
       where Self: Sized { ... }
    fn gpt_3_5_turbo(self) -> Self
       where Self: Sized { ... }
    fn gpt_4_turbo(self) -> Self
       where Self: Sized { ... }
    fn gpt_4_o(self) -> Self
       where Self: Sized { ... }
    fn gpt_4_o_mini(self) -> Self
       where Self: Sized { ... }
    fn o1(self) -> Self
       where Self: Sized { ... }
    fn o1_mini(self) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn model(&mut self) -> &mut ApiLlmModel

Provided Methods§

Source

fn model_id_str(self, model_id: &str) -> Self
where Self: Sized,

Set the model using the model_id string.

Source

fn gpt_4(self) -> Self
where Self: Sized,

Use gpt-4 as the model for the OpenAI client.

Source

fn gpt_4_32k(self) -> Self
where Self: Sized,

Use gpt-4-32k as the model for the OpenAI client. Limited support for this model from OpenAI.

Source

fn gpt_3_5_turbo(self) -> Self
where Self: Sized,

Use gpt-3.5-turbo as the model for the OpenAI client.

Source

fn gpt_4_turbo(self) -> Self
where Self: Sized,

Use gpt-4-turbo as the model for the OpenAI client.

Source

fn gpt_4_o(self) -> Self
where Self: Sized,

Use gpt-4-o as the model for the OpenAI client.

Source

fn gpt_4_o_mini(self) -> Self
where Self: Sized,

Use gpt-4o-mini as the model for the OpenAI client.

Source

fn o1(self) -> Self
where Self: Sized,

Use o1 as the model for the OpenAI client.

Source

fn o1_mini(self) -> Self
where Self: Sized,

Use o1-mini as the model for the OpenAI client.

Implementors§