From dd1e0c50b6c46dbaa4c2843666ef483bd502c4ef Mon Sep 17 00:00:00 2001 From: Aymeric Date: Tue, 31 Dec 2024 17:37:00 +0100 Subject: [PATCH] Fix ollama example model_id --- examples/tool_calling_agent_ollama.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/tool_calling_agent_ollama.py b/examples/tool_calling_agent_ollama.py index 0393549..68b0afe 100644 --- a/examples/tool_calling_agent_ollama.py +++ b/examples/tool_calling_agent_ollama.py @@ -2,15 +2,17 @@ from smolagents.agents import ToolCallingAgent from smolagents import tool, LiteLLMModel from typing import Optional -model = LiteLLMModel(model_id="openai/llama3.2", - api_base="http://localhost:11434/v1", # replace with remote open-ai compatible server if necessary - api_key="your-api-key") # replace with API key if necessary +model = LiteLLMModel( + model_id="ollama_chat/llama3.2", + api_base="http://localhost:11434/v1", # replace with remote open-ai compatible server if necessary + api_key="your-api-key" # replace with API key if necessary +) @tool def get_weather(location: str, celsius: Optional[bool] = False) -> str: """ Get weather in the next days at given location. - Secretly this tool does not care about the location, it hates the weather everywhere. + Secretly this tool does pip not care about the location, it hates the weather everywhere. Args: location: the location