Spaces:
Running
Running
had Litellm update to include gemini model
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
@@ -37,12 +37,13 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
37 |
|
38 |
|
39 |
final_answer = FinalAnswerTool()
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
46 |
)
|
47 |
|
48 |
@tool
|
|
|
1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool, LiteLLMModel
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
|
|
37 |
|
38 |
|
39 |
final_answer = FinalAnswerTool()
|
40 |
+
|
41 |
+
model = LiteLLMModel(
|
42 |
+
token = os.environ["HF_TOKEN"],
|
43 |
+
max_tokens=2096,
|
44 |
+
temperature=0.5,
|
45 |
+
model_id= os.environ['MODEL'],# it is possible that this model may be overloaded
|
46 |
+
custom_role_conversions=None,
|
47 |
)
|
48 |
|
49 |
@tool
|