cubukcum commited on
Commit
ee0a948
·
verified ·
1 Parent(s): af35ffb

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +6 -2
agent.py CHANGED
@@ -1,5 +1,5 @@
1
  import os
2
- from smolagents import CodeAgent, DuckDuckGoSearchTool, tool, InferenceClientModel
3
 
4
  @tool
5
  def add(a: int, b: int) -> int:
@@ -55,7 +55,11 @@ def divide(a: int, b: int) -> float:
55
  class BasicAgent:
56
  def __init__(self):
57
  print("BasicAgent initialized.")
58
- llm = InferenceClientModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct")
 
 
 
 
59
 
60
  self.agent = CodeAgent(
61
  tools=[add,subtract,multiply,divide,DuckDuckGoSearchTool()],
 
1
  import os
2
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, tool, InferenceClientModel, OpenAIServerModel
3
 
4
  @tool
5
  def add(a: int, b: int) -> int:
 
55
  class BasicAgent:
56
  def __init__(self):
57
  print("BasicAgent initialized.")
58
+ llm = OpenAIServerModel(
59
+ model_id="gemini-2.0-flash",
60
+ # Google Gemini OpenAI-compatible API base URL
61
+ api_base="https://generativelanguage.googleapis.com/v1beta/openai/",
62
+ api_key=GEMINI_API_KEY,)
63
 
64
  self.agent = CodeAgent(
65
  tools=[add,subtract,multiply,divide,DuckDuckGoSearchTool()],