pub struct ChatCompletionRunToolsRequestBuilder { /* private fields */ }Available on crate feature
tool-runner only.Expand description
表示工具运行构建器。
Implementations§
Source§impl ChatCompletionRunToolsRequestBuilder
impl ChatCompletionRunToolsRequestBuilder
Sourcepub fn messages(self, messages: Vec<ChatCompletionMessage>) -> Self
pub fn messages(self, messages: Vec<ChatCompletionMessage>) -> Self
设置消息列表。
Sourcepub fn message_user(self, content: impl Into<String>) -> Self
pub fn message_user(self, content: impl Into<String>) -> Self
追加一条 user 消息。
Sourcepub fn register_tool(self, tool: ToolDefinition) -> Self
pub fn register_tool(self, tool: ToolDefinition) -> Self
注册一个工具。
Sourcepub fn max_rounds(self, max_rounds: usize) -> Self
pub fn max_rounds(self, max_rounds: usize) -> Self
设置最大工具轮次。
Sourcepub async fn into_runner(self) -> Result<ChatCompletionRunner>
pub async fn into_runner(self) -> Result<ChatCompletionRunner>
Sourcepub async fn into_streaming_runner(
self,
) -> Result<ChatCompletionStreamingRunner>
pub async fn into_streaming_runner( self, ) -> Result<ChatCompletionStreamingRunner>
Sourcepub async fn send(self) -> Result<ChatCompletion>
pub async fn send(self) -> Result<ChatCompletion>
Sourcepub async fn send_streaming(self) -> Result<ChatCompletion>
pub async fn send_streaming(self) -> Result<ChatCompletion>
Trait Implementations§
Source§impl Clone for ChatCompletionRunToolsRequestBuilder
impl Clone for ChatCompletionRunToolsRequestBuilder
Source§fn clone(&self) -> ChatCompletionRunToolsRequestBuilder
fn clone(&self) -> ChatCompletionRunToolsRequestBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for ChatCompletionRunToolsRequestBuilder
impl !RefUnwindSafe for ChatCompletionRunToolsRequestBuilder
impl Send for ChatCompletionRunToolsRequestBuilder
impl Sync for ChatCompletionRunToolsRequestBuilder
impl Unpin for ChatCompletionRunToolsRequestBuilder
impl UnsafeUnpin for ChatCompletionRunToolsRequestBuilder
impl !UnwindSafe for ChatCompletionRunToolsRequestBuilder
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