cubukcum commited on
Commit
9356c06
·
verified ·
1 Parent(s): 9a6e431

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -5
agent.py CHANGED
@@ -1,9 +1,6 @@
1
  import os
2
- from smolagents import CodeAgent, DuckDuckGoSearchTool, tool, LiteLLMModel
3
- from dotenv import load_dotenv
4
- load_dotenv()
5
 
6
- api_key = os.getenv("OPENAI_API_KEY")
7
 
8
  @tool
9
  def add(a: int, b: int) -> int:
@@ -59,7 +56,7 @@ def divide(a: int, b: int) -> float:
59
  class BasicAgent:
60
  def __init__(self):
61
  print("BasicAgent initialized.")
62
- llm = LiteLLMModel("openai/gpt-4o-mini", api_key = api_key)
63
 
64
  self.agent = CodeAgent(
65
  tools=[add,subtract,multiply,divide,DuckDuckGoSearchTool()],
 
1
  import os
2
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, tool, InferenceClientModel
 
 
3
 
 
4
 
5
  @tool
6
  def add(a: int, b: int) -> int:
 
56
  class BasicAgent:
57
  def __init__(self):
58
  print("BasicAgent initialized.")
59
+ llm = InferenceClientModel()
60
 
61
  self.agent = CodeAgent(
62
  tools=[add,subtract,multiply,divide,DuckDuckGoSearchTool()],