pub struct ConversationItems<'c, C: Config> {
pub conversation_id: String,
/* private fields */
}Available on crate feature
responses only.Expand description
Conversation items represent items within a conversation.
Fields§
§conversation_id: StringImplementations§
Source§impl<'c, C: Config> ConversationItems<'c, C>
impl<'c, C: Config> ConversationItems<'c, C>
pub fn new(client: &'c Client<C>, conversation_id: &str) -> Self
Sourcepub async fn create(
&self,
request: CreateConversationItemsRequest,
) -> Result<ConversationItemList, OpenAIError>
pub async fn create( &self, request: CreateConversationItemsRequest, ) -> Result<ConversationItemList, OpenAIError>
Create items in a conversation. Create items in a conversation.
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 items in a conversation.
Sourcepub async fn list(&self) -> Result<ConversationItemList, OpenAIError>
pub async fn list(&self) -> Result<ConversationItemList, OpenAIError>
List all items for a conversation. List all items for a conversation.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
List all items for a conversation.
Sourcepub async fn retrieve(
&self,
item_id: &str,
) -> Result<ConversationItem, OpenAIError>
pub async fn retrieve( &self, item_id: &str, ) -> Result<ConversationItem, OpenAIError>
Retrieve an item from a conversation. Retrieve an item from a conversation.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
item_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, item_id: T0, ) -> Result<R, OpenAIError>
Retrieve an item from a conversation.
Sourcepub async fn delete(
&self,
item_id: &str,
) -> Result<ConversationResource, OpenAIError>
pub async fn delete( &self, item_id: &str, ) -> Result<ConversationResource, OpenAIError>
Delete an item from a conversation. Delete an item from a conversation.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
item_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, item_id: T0, ) -> Result<R, OpenAIError>
Delete an item from a conversation.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for ConversationItems<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for ConversationItems<'c, C>
Available on crate feature
_api only.Source§fn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Source§fn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Source§fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header to RequestOptions
Auto Trait Implementations§
impl<'c, C> Freeze for ConversationItems<'c, C>
impl<'c, C> !RefUnwindSafe for ConversationItems<'c, C>
impl<'c, C> Send for ConversationItems<'c, C>
impl<'c, C> Sync for ConversationItems<'c, C>
impl<'c, C> Unpin for ConversationItems<'c, C>
impl<'c, C> !UnwindSafe for ConversationItems<'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