Murali-rade commited on
Commit
85e737f
·
verified ·
1 Parent(s): d957c50

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +10 -4
agent.py CHANGED
@@ -6,7 +6,7 @@ import pandas as pd
6
  from dotenv import load_dotenv
7
  from smolagents import (CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool,
8
  LiteLLMModel, PythonInterpreterTool,
9
- WikipediaSearchTool)
10
  from smolagents.tools import Tool
11
  from tabulate import tabulate
12
 
@@ -14,8 +14,14 @@ from tabulate import tabulate
14
  load_dotenv()
15
 
16
  # Initialize the model
17
- model = LiteLLMModel(
18
- model_id=os.getenv("GEMINI_MODEL"), api_key=os.getenv("KEY")
 
 
 
 
 
 
19
  )
20
 
21
 
@@ -93,7 +99,7 @@ class GaiaAgent:
93
  ]
94
 
95
  self.agent = CodeAgent(
96
- model=model,
97
  tools=tools,
98
  add_base_tools=True,
99
  additional_authorized_imports=["pandas", "numpy", "csv", "subprocess"],
 
6
  from dotenv import load_dotenv
7
  from smolagents import (CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool,
8
  LiteLLMModel, PythonInterpreterTool,
9
+ WikipediaSearchTool, OpenAIClient)
10
  from smolagents.tools import Tool
11
  from tabulate import tabulate
12
 
 
14
  load_dotenv()
15
 
16
  # Initialize the model
17
+ # model = LiteLLMModel(
18
+ # model_id=os.getenv("GEMINI_MODEL"), api_key=os.getenv("KEY")
19
+ # )
20
+
21
+ client = OpenAIClient(
22
+ base_url="https://router.huggingface.co/v1",
23
+ api_key=os.environ["HF_TOKEN"],
24
+ model="openai/gpt-oss-120b:novita"
25
  )
26
 
27
 
 
99
  ]
100
 
101
  self.agent = CodeAgent(
102
+ llm_client=client,
103
  tools=tools,
104
  add_base_tools=True,
105
  additional_authorized_imports=["pandas", "numpy", "csv", "subprocess"],