Data models for working with tools in the xpander.ai SDK
Enum Value | Description |
---|---|
ToolCallType.XPANDER | Tool calls executed on the xpander.ai platform |
ToolCallType.LOCAL | Tool calls executed locally in your application |
ToolCallType.UNKNOWN | Unrecognized tool calls (typically a fallback value) |
Property | Type | Description |
---|---|---|
name | string | The name of the tool being called |
type | ToolCallType | The type of the tool (XPANDER, LOCAL, etc.) |
payload | Object | The parameters passed to the tool |
tool_call_id | string | A unique identifier for the tool call |
extract_tool_calls()
method:
Property | Type | Description |
---|---|---|
function_name | string | The name of the function that was called |
tool_call_id | string | The ID of the original tool call |
is_success | boolean | Whether the tool call was successful |
result | string | The result of the tool call (if successful) |
error | string | Error message (if the tool call failed) |
payload | Object | The original parameters passed to the tool |
run_tool()
or run_tools()
methods:
Enum Value | Description |
---|---|
LLMProvider.OPEN_AI | OpenAI’s format for GPT models |
LLMProvider.FRIENDLI_AI | Claude format (via FriendliAI) |
LLMProvider.GEMINI_OPEN_AI | Google Gemini with OpenAI-compatible format |
LLMProvider.OLLAMA | Ollama format for local models |