Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,8 +21,8 @@ class BasicAgent:
|
|
| 21 |
def __init__(self):
|
| 22 |
api_key = os.getenv("GROQ_API_KEY")
|
| 23 |
tool_spec = DuckDuckGoSearchToolSpec()
|
| 24 |
-
|
| 25 |
-
|
| 26 |
self.agent = ReActAgent(tools=[search_tool], llm=llm)
|
| 27 |
print("BasicAgent initialized.")
|
| 28 |
def __call__(self, question: str) -> str:
|
|
|
|
| 21 |
def __init__(self):
|
| 22 |
api_key = os.getenv("GROQ_API_KEY")
|
| 23 |
tool_spec = DuckDuckGoSearchToolSpec()
|
| 24 |
+
search_tool = FunctionTool.from_defaults(tool_spec.duckduckgo_full_search)
|
| 25 |
+
llm = Groq(model="qwen-qwq-32b", api_key=api_key)
|
| 26 |
self.agent = ReActAgent(tools=[search_tool], llm=llm)
|
| 27 |
print("BasicAgent initialized.")
|
| 28 |
def __call__(self, question: str) -> str:
|