naco08 commited on
Commit
1999f08
·
verified ·
1 Parent(s): 461f899

Upload agent

Browse files
Files changed (3) hide show
  1. agent.json +3 -2
  2. app.py +4 -3
  3. tools/web_search.py +1 -1
agent.json CHANGED
@@ -9,9 +9,10 @@
9
  "final_answer"
10
  ],
11
  "model": {
12
- "class": "InferenceClientModel",
13
  "data": {
14
- "model_id": "Qwen/Qwen2.5-Coder-32B-Instruct"
 
15
  }
16
  },
17
  "managed_agents": {},
 
9
  "final_answer"
10
  ],
11
  "model": {
12
+ "class": "LiteLLMModel",
13
  "data": {
14
+ "model_id": "gemini/gemini-2.0-flash",
15
+ "api_base": null
16
  }
17
  },
18
  "managed_agents": {},
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import yaml
2
  import os
3
- from smolagents import GradioUI, CodeAgent, InferenceClientModel
4
 
5
  # Get current directory path
6
  CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -14,8 +14,9 @@ from tools.final_answer import FinalAnswerTool as FinalAnswer
14
 
15
 
16
 
17
- model = InferenceClientModel(
18
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
 
19
  )
20
 
21
  web_search = WebSearch()
 
1
  import yaml
2
  import os
3
+ from smolagents import GradioUI, CodeAgent, LiteLLMModel
4
 
5
  # Get current directory path
6
  CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
 
14
 
15
 
16
 
17
+ model = LiteLLMModel(
18
+ model_id='gemini/gemini-2.0-flash',
19
+ api_base=None,
20
  )
21
 
22
  web_search = WebSearch()
tools/web_search.py CHANGED
@@ -1,7 +1,7 @@
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
3
- import duckduckgo_search
4
  import time
 
5
 
6
  class DuckDuckGoSearchTool(Tool):
7
  """Web search tool that performs searches using the DuckDuckGo search engine.
 
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
 
3
  import time
4
+ import duckduckgo_search
5
 
6
  class DuckDuckGoSearchTool(Tool):
7
  """Web search tool that performs searches using the DuckDuckGo search engine.