-
Notifications
You must be signed in to change notification settings - Fork 134
Description
when I do ollama test in 02_llm_powered_agents file, in Implementing Function Calling Capabilities part, I cannot get the final result like this
"🤖 Function-Enabled Agent wants to call a function:
Function: get_weather
Parameters:
location: Tokyo
⚙️ Function result:
{'temperature': 26, 'conditions': 'Sunny', 'humidity': 70, 'wind_speed': 5, 'unit': 'celsius', 'location': 'Tokyo'}
Parsing function call from text: Based on the weather data provided:
The current weather in Tokyo is:
- Temperature: 26°C
- Conditions: Sunny
- Humidity: 70%
- Wind Speed: 5 km/h
It's a warm and sunny day in Tokyo with moderate humidity. The light wind speed of 5 km/h should make for pleasant conditions.
🤖 Function-Enabled Agent final response:
Based on the weather data provided:
The current weather in Tokyo is:
- Temperature: 26°C
- Conditions: Sunny
- Humidity: 70%
- Wind Speed: 5 km/h
It's a warm and sunny day in Tokyo with moderate humidity. The light wind speed of 5 km/h should make for pleasant conditions."
I got final result like this:
"
Function-enabled OpenAI agent created successfully!
🔍 Testing Function-Enabled Agent function calling...
INFO:httpx:HTTP Request: POST http://127.0.0.1:11434/v1/chat/completions "HTTP/1.1 200 OK"
🤖 Function-Enabled Agent wants to call a function:
Function: get_weather
Parameters:
location: Tokyo
⚙️ Function result:
{'temperature': 26, 'conditions': 'Sunny', 'humidity': 70, 'wind_speed': 5, 'unit': 'celsius', 'location': 'Tokyo'}
INFO:httpx:HTTP Request: POST http://127.0.0.1:11434/v1/chat/completions "HTTP/1.1 200 OK"
🤖 Function-Enabled Agent final response:
......To provide the weather information, I need to know the location you're interested in. Could you please specify a city or region?
"
I used qwq:latest with ollama