Fix ollama example model_id
This commit is contained in:
		
							parent
							
								
									64de40efcb
								
							
						
					
					
						commit
						dd1e0c50b6
					
				|  | @ -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", | ||||
| 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 | ||||
|     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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue