pub struct ToolCallResult {
pub message: Option<ToolCallResultMessage>,
pub name: String,
pub tool_call_id: String,
pub result: Option<String>,
pub error: Option<String>,
pub metadata: Option<Value>,
}
Fields§
§message: Option<ToolCallResultMessage>
§name: String
This is the name of the function the model called.
tool_call_id: String
This 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
metadata: Option<Value>
This is optional metadata for the tool call result to be sent to the client.
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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more