final assignment gaia agent tools submission enabled system prompt litellm
Browse files- agents/gaia.py +8 -2
agents/gaia.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# --- Gaia Agent Definition ---
|
| 2 |
from smolagents import CodeAgent, DuckDuckGoSearchTool
|
| 3 |
from tools.gaiatool import fetch_questions
|
| 4 |
-
from smolagents import LiteLLMModel
|
| 5 |
import os
|
| 6 |
|
| 7 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
@@ -18,7 +18,13 @@ class GaiaAgent:
|
|
| 18 |
self.questions_url = f"{api_url}/questions"
|
| 19 |
|
| 20 |
# Initialize the model
|
| 21 |
-
self.model = LiteLLMModel(model_id="gemini/gemini-1.5-flash-latest", api_key=os.getenv("GEMINI_API_KEY"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
# Initialize the DuckDuckGo search tool
|
| 24 |
self.search_tool = DuckDuckGoSearchTool()
|
|
|
|
| 1 |
# --- Gaia Agent Definition ---
|
| 2 |
from smolagents import CodeAgent, DuckDuckGoSearchTool
|
| 3 |
from tools.gaiatool import fetch_questions
|
| 4 |
+
from smolagents import LiteLLMModel, OpenAIServerModel, HfApiModel
|
| 5 |
import os
|
| 6 |
|
| 7 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
|
| 18 |
self.questions_url = f"{api_url}/questions"
|
| 19 |
|
| 20 |
# Initialize the model
|
| 21 |
+
#self.model = LiteLLMModel(model_id="gemini/gemini-1.5-flash-latest", api_key=os.getenv("GEMINI_API_KEY"))
|
| 22 |
+
self.model = OpenAIServerModel(
|
| 23 |
+
model_id="gpt-4o-mini",
|
| 24 |
+
api_base="https://api.openai.com/v1",
|
| 25 |
+
api_key=os.environ["OPENAI_API_KEY"],
|
| 26 |
+
temperature=0.0
|
| 27 |
+
)
|
| 28 |
|
| 29 |
# Initialize the DuckDuckGo search tool
|
| 30 |
self.search_tool = DuckDuckGoSearchTool()
|