BotConnector
Sign in Workspace Open App

Python tools

Beta

Tool calling is Experimental at the runtime level (see Tool use); model/template support varies. The source SDK is implemented, but its PyPI package is not published.

Target SDK design

python
from botconnector import Client

client = Client()
model = client.llm("<publisher>/<model>")

tools = [{
    "type": "function",
    "function": {
        "name": "get_weather",
        "description": "Get current weather",
        "parameters": {
            "type": "object",
            "properties": {"city": {"type": "string"}},
            "required": ["city"],
        },
    },
}]

response = model.chat("What is the weather in Jakarta?", tools=tools)
if response.tool_calls:
    result = my_weather_impl(response.tool_calls[0].arguments["city"])
    # feed result back and continue the conversation
Tool-call reliability depends on model + chat template. Use the source SDK or the OpenAI-compatible API — see Tool use — with the caveats listed there.