Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,16 +10,16 @@ class BasicAgent:
|
|
| 10 |
def __init__(self):
|
| 11 |
print("Initializing agent via OpenRouter...")
|
| 12 |
# Uses OpenRouter — free $1 credit, no HF credit consumption
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
print("Agent ready.")
|
| 24 |
|
| 25 |
def __call__(self, question: str) -> str:
|
|
|
|
| 10 |
def __init__(self):
|
| 11 |
print("Initializing agent via OpenRouter...")
|
| 12 |
# Uses OpenRouter — free $1 credit, no HF credit consumption
|
| 13 |
+
self.agent = CodeAgent(
|
| 14 |
+
tools=[DuckDuckGoSearchTool()],
|
| 15 |
+
model=OpenAIServerModel(
|
| 16 |
+
model_id="llama-3.3-70b-versatile",
|
| 17 |
+
api_base="https://api.groq.com/openai/v1",
|
| 18 |
+
api_key=os.environ["GROQ_API_KEY"],
|
| 19 |
+
),
|
| 20 |
+
max_steps=4,
|
| 21 |
+
verbosity_level=0,
|
| 22 |
+
)
|
| 23 |
print("Agent ready.")
|
| 24 |
|
| 25 |
def __call__(self, question: str) -> str:
|