pub struct ChatCompletionStreamingRunner { /* private fields */ }Available on crate feature
tool-runner only.Expand description
表示流式工具调用运行 trace。
Implementations§
Source§impl ChatCompletionStreamingRunner
impl ChatCompletionStreamingRunner
Sourcepub fn events(&self) -> &[ChatCompletionRuntimeEvent]
pub fn events(&self) -> &[ChatCompletionRuntimeEvent]
返回流式运行过程中产生的全部高层事件。
Sourcepub fn messages(&self) -> &[ChatCompletionMessage]
pub fn messages(&self) -> &[ChatCompletionMessage]
返回运行过程中累积的全部消息。
Sourcepub fn all_chat_completions(&self) -> &[ChatCompletion]
pub fn all_chat_completions(&self) -> &[ChatCompletion]
返回运行过程中累积的全部聊天补全。
Sourcepub fn tool_results(&self) -> &[ChatCompletionToolResult]
pub fn tool_results(&self) -> &[ChatCompletionToolResult]
返回运行过程中累积的全部工具调用结果。
Sourcepub fn final_chat_completion(&self) -> Option<&ChatCompletion>
pub fn final_chat_completion(&self) -> Option<&ChatCompletion>
返回最终聊天补全结果。
Sourcepub fn final_message(&self) -> Option<&ChatCompletionMessage>
pub fn final_message(&self) -> Option<&ChatCompletionMessage>
返回最终 assistant 消息。
Sourcepub fn final_content(&self) -> Option<&str>
pub fn final_content(&self) -> Option<&str>
返回最终 assistant 文本。
Sourcepub fn final_function_tool_call(&self) -> Option<&ChatCompletionToolCall>
pub fn final_function_tool_call(&self) -> Option<&ChatCompletionToolCall>
返回最终工具调用。
Sourcepub fn final_function_tool_call_result(&self) -> Option<&str>
pub fn final_function_tool_call_result(&self) -> Option<&str>
返回最终工具调用结果。
Sourcepub fn total_usage(&self) -> Option<CompletionUsage>
pub fn total_usage(&self) -> Option<CompletionUsage>
汇总所有补全响应中的 usage 字段。
Trait Implementations§
Source§impl Clone for ChatCompletionStreamingRunner
impl Clone for ChatCompletionStreamingRunner
Source§fn clone(&self) -> ChatCompletionStreamingRunner
fn clone(&self) -> ChatCompletionStreamingRunner
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 moreSource§impl Default for ChatCompletionStreamingRunner
impl Default for ChatCompletionStreamingRunner
Source§fn default() -> ChatCompletionStreamingRunner
fn default() -> ChatCompletionStreamingRunner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChatCompletionStreamingRunner
impl RefUnwindSafe for ChatCompletionStreamingRunner
impl Send for ChatCompletionStreamingRunner
impl Sync for ChatCompletionStreamingRunner
impl Unpin for ChatCompletionStreamingRunner
impl UnsafeUnpin for ChatCompletionStreamingRunner
impl UnwindSafe for ChatCompletionStreamingRunner
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