pub struct ToolCallResult {
pub message: Option<Vec<ToolCallResultMessageInner>>,
pub name: String,
pub tool_call_id: String,
pub result: Option<String>,
pub error: Option<String>,
}Fields§
§message: Option<Vec<ToolCallResultMessageInner>>This is the message that will be spoken to the user. If this is not returned, assistant will speak: 1. a request-complete or request-failed message from tool.messages, if it exists 2. a response generated by the model, if not
name: StringThis is the name of the function the model called.
tool_call_id: StringThis is the unique identifier for the tool call.
result: Option<String>This is the result if the tool call was successful. This is added to the conversation history. Further, if this is returned, assistant will speak: 1. the message, if it exists and is of type request-complete 2. a request-complete message from tool.messages, if it exists 3. a response generated by the model, if neither exist
error: Option<String>This is the error if the tool call was not successful. This is added to the conversation history. Further, if this is returned, assistant will speak: 1. the message, if it exists and is of type request-failed 2. a request-failed message from tool.messages, if it exists 3. a response generated by the model, if neither exist
Implementations§
Source§impl ToolCallResult
impl ToolCallResult
pub fn new(name: String, tool_call_id: String) -> ToolCallResult
Trait Implementations§
Source§impl Clone for ToolCallResult
impl Clone for ToolCallResult
Source§fn clone(&self) -> ToolCallResult
fn clone(&self) -> ToolCallResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more