Spaces:
Sleeping
Sleeping
update local model
Browse files
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="
|
| 182 |
-
api_base="http://localhost:
|
| 183 |
-
api_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 |
)
|