Struct async_openai_wasm::Assistants
source · pub struct Assistants<'c> { /* private fields */ }
Expand description
Build assistants that can call models and use tools to perform tasks.
Implementations§
source§impl<'c> Assistants<'c>
impl<'c> Assistants<'c>
pub fn new(client: &'c Client) -> Self
sourcepub fn files(&self, assistant_id: &str) -> AssistantFiles<'_>
pub fn files(&self, assistant_id: &str) -> AssistantFiles<'_>
Assistant AssistantFiles API group
sourcepub async fn create(
&self,
request: CreateAssistantRequest
) -> Result<AssistantObject, OpenAIError>
pub async fn create( &self, request: CreateAssistantRequest ) -> Result<AssistantObject, OpenAIError>
Create an assistant with a model and instructions.
sourcepub async fn retrieve(
&self,
assistant_id: &str
) -> Result<AssistantObject, OpenAIError>
pub async fn retrieve( &self, assistant_id: &str ) -> Result<AssistantObject, OpenAIError>
Retrieves an assistant.
sourcepub async fn update(
&self,
assistant_id: &str,
request: ModifyAssistantRequest
) -> Result<AssistantObject, OpenAIError>
pub async fn update( &self, assistant_id: &str, request: ModifyAssistantRequest ) -> Result<AssistantObject, OpenAIError>
Modifies an assistant.
sourcepub async fn delete(
&self,
assistant_id: &str
) -> Result<DeleteAssistantResponse, OpenAIError>
pub async fn delete( &self, assistant_id: &str ) -> Result<DeleteAssistantResponse, OpenAIError>
Delete an assistant.
sourcepub async fn list<Q>(
&self,
query: &Q
) -> Result<ListAssistantsResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q ) -> Result<ListAssistantsResponse, OpenAIError>
Returns a list of assistants.
Auto Trait Implementations§
impl<'c> Freeze for Assistants<'c>
impl<'c> !RefUnwindSafe for Assistants<'c>
impl<'c> !Send for Assistants<'c>
impl<'c> !Sync for Assistants<'c>
impl<'c> Unpin for Assistants<'c>
impl<'c> !UnwindSafe for Assistants<'c>
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