components.ToolCall
Tool Call functionality for Components integration.
ToolCallConfig
Tool call config.
This class represents a tool call config.
ToolCallConfigDict
Tool call config dict.
This class represents a tool call config dictionary.
get_tool_call_config_dict
Convert a tool call config to a tool call config dict else return the config.
Arguments:
Name | Description |
---|---|
config | The config to convert. |
Returns:
Name | Description |
---|---|
[ToolCallConfigDict](/sdk/python/references/logger/components/tool_call) | The tool call config dict. |
ToolCallError
Tool call error.
This class represents a tool call error.
get_tool_call_error_dict
Convert a tool call error to a tool call error dict else return the error.
Arguments:
Name | Description |
---|---|
error | The error to convert. |
Returns:
dict[str, Any]: The tool call error dict.
ToolCall
Tool call.
This class represents a tool call.
__init__
Initialize a tool call.
Arguments:
Name | Description |
---|---|
config | The config to initialize the tool call with. |
writer | The writer to use. |
update
Update the tool call.
Arguments:
Name | Description |
---|---|
data | The data to update the tool call with. |
update_
Update the tool call.
Arguments:
Name | Description |
---|---|
writer | The writer to use. |
id | The id of the tool call to update. |
data | The data to update the tool call with. |
result_
Update the tool call.
Arguments:
Name | Description |
---|---|
writer | The writer to use. |
id | The id of the tool call to update. |
result | The result to update the tool call with. |
attach_evaluators
Attach evaluators to the tool call.
Arguments:
Name | Description |
---|---|
evaluators | The evaluators to attach to the tool call. |
result
Update the tool call.
Arguments:
Name | Description |
---|---|
result | The result to update the tool call with. |
error
Add an error to the tool call.
Arguments:
Name | Description |
---|---|
error | The tool call error. |
error_
Add an error to the tool call.
Arguments:
Name | Description |
---|---|
writer | The writer to use. |
id | The id of the tool call to add the error to. |
error | The tool call error. |
data
Get the data for the tool call.
Returns:
Dict[str, Any]: The data for the tool call.