Documentation Index
Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
View module source on GitHub
@deprecated(
"This class will be removed in a future version. Use {} which is TypedDict."
)
@dataclass
class ToolCallConfig()
Tool call config.
This class represents a tool call config.
class ToolCallConfigDict(TypedDict)
Tool call config dict.
This class represents a tool call config dictionary.
def get_tool_call_config_dict(
config: Union[ToolCallConfig,
ToolCallConfigDict]) -> ToolCallConfigDict
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. |
@deprecated(
"This class will be removed in a future version. Use {} which is TypedDict instead."
)
@dataclass
class ToolCallError()
Tool call error.
This class represents a tool call error.
def get_tool_call_error_dict(
error: Union[ToolCallError, ToolCallErrorDict]) -> dict[str, Any]
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.
class ToolCall(BaseContainer)
Tool call.
This class represents a tool call.
__init__
def __init__(config: Union[ToolCallConfig, ToolCallConfigDict],
writer: LogWriter)
Initialize a tool call.
Arguments:
| Name | Description |
|---|
config | The config to initialize the tool call with. |
writer | The writer to use. |
update
def update(data: Dict[str, Any])
Update the tool call.
Arguments:
| Name | Description |
|---|
data | The data to update the tool call with. |
update_
@staticmethod
def update_(writer: LogWriter, id: str, data: Dict[str, Any])
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_
@staticmethod
def result_(writer: LogWriter, id: str, result: str)
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
def attach_evaluators(evaluators: List[str])
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
def error(error: ToolCallError)
Add an error to the tool call.
Arguments:
| Name | Description |
|---|
error | The tool call error. |
error_
@staticmethod
def error_(writer: LogWriter, id: str, error: Union[ToolCallError,
ToolCallErrorDict])
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
def data() -> Dict[str, Any]
Get the data for the tool call.
Returns:
Dict[str, Any]: The data for the tool call.