Struct async_openai::Assistants
source · pub struct Assistants<'c, C: Config> { /* private fields */ }
Expand description
Build assistants that can call models and use tools to perform tasks.
Implementations§
source§impl<'c, C: Config> Assistants<'c, C>
impl<'c, C: Config> Assistants<'c, C>
pub fn new(client: &'c Client<C>) -> Self
sourcepub fn files(&self, assistant_id: &str) -> AssistantFiles<'_, C>
pub fn files(&self, assistant_id: &str) -> AssistantFiles<'_, C>
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, C> Freeze for Assistants<'c, C>
impl<'c, C> !RefUnwindSafe for Assistants<'c, C>
impl<'c, C> Send for Assistants<'c, C>where
C: Sync,
impl<'c, C> Sync for Assistants<'c, C>where
C: Sync,
impl<'c, C> Unpin for Assistants<'c, C>
impl<'c, C> !UnwindSafe for Assistants<'c, 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