pub struct ConversationsResource { /* private fields */ }Expand description
EN: Conversations API resource. 中文:Conversations API 资源。
Implementations§
Source§impl ConversationsResource
impl ConversationsResource
Sourcepub async fn create(
&self,
request: CreateConversationRequest,
) -> Result<Conversation, LingerError>
pub async fn create( &self, request: CreateConversationRequest, ) -> Result<Conversation, LingerError>
EN: Creates a conversation with POST /v1/conversations.
中文:使用 POST /v1/conversations 创建会话。
Sourcepub async fn retrieve(
&self,
conversation_id: &str,
) -> Result<Conversation, LingerError>
pub async fn retrieve( &self, conversation_id: &str, ) -> Result<Conversation, LingerError>
EN: Retrieves a conversation with GET /v1/conversations/{conversation_id}.
中文:使用 GET /v1/conversations/{conversation_id} 获取会话。
Sourcepub async fn modify(
&self,
conversation_id: &str,
request: ModifyConversationRequest,
) -> Result<Conversation, LingerError>
pub async fn modify( &self, conversation_id: &str, request: ModifyConversationRequest, ) -> Result<Conversation, LingerError>
EN: Modifies a conversation with POST /v1/conversations/{conversation_id}.
中文:使用 POST /v1/conversations/{conversation_id} 修改会话。
Sourcepub async fn delete(
&self,
conversation_id: &str,
) -> Result<ConversationDeletion, LingerError>
pub async fn delete( &self, conversation_id: &str, ) -> Result<ConversationDeletion, LingerError>
EN: Deletes a conversation with DELETE /v1/conversations/{conversation_id}.
中文:使用 DELETE /v1/conversations/{conversation_id} 删除会话。
Sourcepub fn items(&self, conversation_id: &str) -> ConversationItemsResource
pub fn items(&self, conversation_id: &str) -> ConversationItemsResource
EN: Returns the Conversation Items subresource for a conversation id. 中文:返回指定 Conversation ID 的 Conversation Items 子资源。
Trait Implementations§
Source§impl Clone for ConversationsResource
impl Clone for ConversationsResource
Source§fn clone(&self) -> ConversationsResource
fn clone(&self) -> ConversationsResource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConversationsResource
impl !UnwindSafe for ConversationsResource
impl Freeze for ConversationsResource
impl Send for ConversationsResource
impl Sync for ConversationsResource
impl Unpin for ConversationsResource
impl UnsafeUnpin for ConversationsResource
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