pub struct OpenAI {
pub client: Client,
/* private fields */
}Expand description
An OpenAI-compatible LLM provider.
Fields§
§client: ClientThe HTTP client.
Implementations§
Source§impl OpenAI
impl OpenAI
Sourcepub fn api(client: Client, key: &str) -> Result<Self>
pub fn api(client: Client, key: &str) -> Result<Self>
Create a provider targeting the OpenAI API.
Sourcepub fn deepseek(client: Client, key: &str) -> Result<Self>
pub fn deepseek(client: Client, key: &str) -> Result<Self>
Create a provider targeting the DeepSeek API.
Sourcepub fn grok(client: Client, key: &str) -> Result<Self>
pub fn grok(client: Client, key: &str) -> Result<Self>
Create a provider targeting the Grok (xAI) API.
Sourcepub fn qwen(client: Client, key: &str) -> Result<Self>
pub fn qwen(client: Client, key: &str) -> Result<Self>
Create a provider targeting the Qwen (DashScope) API.
Sourcepub fn kimi(client: Client, key: &str) -> Result<Self>
pub fn kimi(client: Client, key: &str) -> Result<Self>
Create a provider targeting the Kimi (Moonshot) API.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpenAI
impl !RefUnwindSafe for OpenAI
impl Send for OpenAI
impl Sync for OpenAI
impl Unpin for OpenAI
impl UnsafeUnpin for OpenAI
impl !UnwindSafe for OpenAI
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
Mutably borrows from an owned value. Read more