from openai import OpenAI
client = OpenAI(
base_url="https://api.ajstudioz.co.in/v1",
api_key="YOUR_API_KEY"
)
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city name"
}
},
"required": ["city"]
}
}
}
]
response = client.chat.completions.create(
model="qwen3-coder:480b",
messages=[{"role": "user", "content": "What's the weather in Paris?"}],
tools=tools,
tool_choice="auto"
)
print(response.choices[0].message.tool_calls)