Spaces:
Sleeping
Sleeping
Add new AI models to agent and update requirements.txt
Browse files- agent.py +11 -1
- requirements.txt +3 -1
agent.py
CHANGED
|
@@ -3,9 +3,19 @@ from agno.models.openai import OpenAIChat
|
|
| 3 |
from agno.tools.reasoning import ReasoningTools
|
| 4 |
from agno.tools.duckduckgo import DuckDuckGoTools
|
| 5 |
from agno.tools.wikipedia import WikipediaTools
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
test_question = "On June 6, 2023, an article by Carolyn Collins Petersen was published in Universe Today. This article mentions a team that produced a paper about their observations, linked at the bottom of the article. Find this paper. Under what NASA award number was the work performed by R. G. Arendt supported by?"
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
def get_current_date() -> str:
|
| 11 |
import datetime
|
|
@@ -14,7 +24,7 @@ def get_current_date() -> str:
|
|
| 14 |
|
| 15 |
|
| 16 |
agent = Agent(
|
| 17 |
-
model=
|
| 18 |
markdown=False,
|
| 19 |
debug_mode=True,
|
| 20 |
instructions="You are a general AI assistant. I will ask you a question. Report your thoughts, but your final answer must be only the answer itself, with nothing else. The answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.",
|
|
|
|
| 3 |
from agno.tools.reasoning import ReasoningTools
|
| 4 |
from agno.tools.duckduckgo import DuckDuckGoTools
|
| 5 |
from agno.tools.wikipedia import WikipediaTools
|
| 6 |
+
from agno.models.xai import xAI
|
| 7 |
+
from agno.models.google import Gemini
|
| 8 |
+
from agno.models.openrouter import OpenRouter
|
| 9 |
|
| 10 |
test_question = "On June 6, 2023, an article by Carolyn Collins Petersen was published in Universe Today. This article mentions a team that produced a paper about their observations, linked at the bottom of the article. Find this paper. Under what NASA award number was the work performed by R. G. Arendt supported by?"
|
| 11 |
|
| 12 |
+
model = {
|
| 13 |
+
"grok": xAI(id="grok-3-beta"),
|
| 14 |
+
"gpt": OpenAIChat(id="gpt-4.1-nano"),
|
| 15 |
+
"gemini": Gemini(id="gemini-2.5-pro-preview-03-25"),
|
| 16 |
+
"open_router": OpenRouter(id="qwen/qwen3-235b-a22b")
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
|
| 20 |
def get_current_date() -> str:
|
| 21 |
import datetime
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
agent = Agent(
|
| 27 |
+
model=model["open_router"],
|
| 28 |
markdown=False,
|
| 29 |
debug_mode=True,
|
| 30 |
instructions="You are a general AI assistant. I will ask you a question. Report your thoughts, but your final answer must be only the answer itself, with nothing else. The answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.",
|
requirements.txt
CHANGED
|
@@ -3,4 +3,6 @@ requests
|
|
| 3 |
agno
|
| 4 |
openai
|
| 5 |
duckduckgo-search
|
| 6 |
-
wikipedia
|
|
|
|
|
|
|
|
|
| 3 |
agno
|
| 4 |
openai
|
| 5 |
duckduckgo-search
|
| 6 |
+
wikipedia
|
| 7 |
+
google
|
| 8 |
+
google-genai
|