mtmx commited on
Commit
da8bacb
·
verified ·
1 Parent(s): 6fae833

update local model

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool, HfApiModel
2
  import datetime
3
  import requests
4
  import pytz
@@ -177,10 +177,11 @@ custom_role_conversions=None,
177
 
178
  from smolagents import OpenAIServerModel
179
 
 
180
  model_local = OpenAIServerModel(
181
- model_id="local-model", # Any name
182
- api_base="http://localhost:1234/v1",
183
- api_key="lm-studio", # dummy key
184
  max_tokens=2096,
185
  temperature=0.5,
186
  )
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool, HfApiModel,OpenAIServerModel
2
  import datetime
3
  import requests
4
  import pytz
 
177
 
178
  from smolagents import OpenAIServerModel
179
 
180
+ # Use Ollama's local API
181
  model_local = OpenAIServerModel(
182
+ model_id="llama3.2:3b", # or phi3:mini
183
+ api_base="http://localhost:11434/v1",
184
+ api_key="ollama", # dummy key
185
  max_tokens=2096,
186
  temperature=0.5,
187
  )