pub struct Client { /* private fields */ }
Expand description
Implementations§
Source§impl Client
impl Client
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Create a new client with default configuration from environment variables.
Sourcepub fn http_client(&self) -> &HttpClient
pub fn http_client(&self) -> &HttpClient
Get a reference to the HTTP client.
Source§impl Client
impl Client
Sourcepub fn chat(&self) -> ChatCompletionBuilder
pub fn chat(&self) -> ChatCompletionBuilder
Create a chat completion builder.
Sourcepub fn chat_simple(&self, message: impl Into<String>) -> ChatCompletionBuilder
pub fn chat_simple(&self, message: impl Into<String>) -> ChatCompletionBuilder
Create a chat completion with a simple user message.
Sourcepub fn chat_with_system(
&self,
system: impl Into<String>,
user: impl Into<String>,
) -> ChatCompletionBuilder
pub fn chat_with_system( &self, system: impl Into<String>, user: impl Into<String>, ) -> ChatCompletionBuilder
Create a chat completion with system and user messages.
Source§impl Client
impl Client
Sourcepub fn responses(&self) -> ResponseBuilder
pub fn responses(&self) -> ResponseBuilder
Create a responses builder for structured outputs.
Source§impl Client
impl Client
Sourcepub fn assistants(&self) -> AssistantsClient<'_>
pub fn assistants(&self) -> AssistantsClient<'_>
Get assistants client (placeholder).
Sourcepub fn audio(&self) -> AudioClient<'_>
pub fn audio(&self) -> AudioClient<'_>
Get audio client (placeholder).
Sourcepub fn embeddings(&self) -> EmbeddingsClient<'_>
pub fn embeddings(&self) -> EmbeddingsClient<'_>
Get embeddings client (placeholder).
Sourcepub fn images(&self) -> ImagesClient<'_>
pub fn images(&self) -> ImagesClient<'_>
Get images client (placeholder).
Sourcepub fn files(&self) -> FilesClient<'_>
pub fn files(&self) -> FilesClient<'_>
Get files client (placeholder).
Sourcepub fn fine_tuning(&self) -> FineTuningClient<'_>
pub fn fine_tuning(&self) -> FineTuningClient<'_>
Get fine-tuning client (placeholder).
Sourcepub fn batch(&self) -> BatchClient<'_>
pub fn batch(&self) -> BatchClient<'_>
Get batch client (placeholder).
Sourcepub fn vector_stores(&self) -> VectorStoresClient<'_>
pub fn vector_stores(&self) -> VectorStoresClient<'_>
Get vector stores client (placeholder).
Sourcepub fn moderations(&self) -> ModerationsClient<'_>
pub fn moderations(&self) -> ModerationsClient<'_>
Get moderations client (placeholder).
Sourcepub fn threads(&self) -> ThreadsClient<'_>
pub fn threads(&self) -> ThreadsClient<'_>
Get threads client (placeholder).
Sourcepub fn uploads(&self) -> UploadsClient<'_>
pub fn uploads(&self) -> UploadsClient<'_>
Get uploads client (placeholder).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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