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 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. Create an assistant with a model and instructions.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, 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. Retrieves an assistant.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
assistant_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, assistant_id: T0, ) -> Result<R, 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. Modifies an assistant.
Sourcepub async fn update_byot<T0: Display, T1: Serialize, R: DeserializeOwned>(
&self,
assistant_id: T0,
request: T1,
) -> Result<R, OpenAIError>
pub async fn update_byot<T0: Display, T1: Serialize, R: DeserializeOwned>( &self, assistant_id: T0, request: T1, ) -> Result<R, 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. Delete an assistant.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
assistant_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, assistant_id: T0, ) -> Result<R, 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. Returns a list of assistants.
Sourcepub async fn list_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, 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