Struct kind_openai::OpenAI
source · pub struct OpenAI<Auth> { /* private fields */ }
Expand description
A handle to OpenAI.
Implementations§
source§impl<Auth> OpenAI<Auth>where
Auth: AuthTokenProvider,
impl<Auth> OpenAI<Auth>where
Auth: AuthTokenProvider,
sourcepub async fn create_chat_completion<'a, S>(
&self,
req: &ChatCompletionRequest<'a, S>,
) -> OpenAIResult<ChatCompletion<S>>where
S: OpenAISchema + for<'de> Deserialize<'de>,
pub async fn create_chat_completion<'a, S>(
&self,
req: &ChatCompletionRequest<'a, S>,
) -> OpenAIResult<ChatCompletion<S>>where
S: OpenAISchema + for<'de> Deserialize<'de>,
Creates a structured chat completion on any type that implements
OpenAISchema
.
Trait Implementations§
Auto Trait Implementations§
impl<Auth> Freeze for OpenAI<Auth>where
Auth: Freeze,
impl<Auth> !RefUnwindSafe for OpenAI<Auth>
impl<Auth> Send for OpenAI<Auth>where
Auth: Send,
impl<Auth> Sync for OpenAI<Auth>where
Auth: Sync,
impl<Auth> Unpin for OpenAI<Auth>where
Auth: Unpin,
impl<Auth> !UnwindSafe for OpenAI<Auth>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)