Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,8 @@ CRITICAL: Every response MUST wrap Python code in <code>\ncode here\n</code> tag
|
|
| 22 |
SYSTEM_PROMPT += """
|
| 23 |
If visit_webpage fails on wikipedia.org with a 403 error, immediately retry using https://r.jina.ai/http://[original-url] instead of retrying the same URL."""
|
| 24 |
|
|
|
|
|
|
|
| 25 |
# --- Basic Agent Definition ---
|
| 26 |
import time
|
| 27 |
|
|
@@ -37,7 +39,7 @@ class BasicAgent:
|
|
| 37 |
self.agent = CodeAgent(
|
| 38 |
tools=[DuckDuckGoSearchTool(max_results=2),VisitWebpageTool()], # très limité
|
| 39 |
model=self.model,
|
| 40 |
-
max_steps=
|
| 41 |
)
|
| 42 |
|
| 43 |
def __call__(self, question: str) -> str:
|
|
|
|
| 22 |
SYSTEM_PROMPT += """
|
| 23 |
If visit_webpage fails on wikipedia.org with a 403 error, immediately retry using https://r.jina.ai/http://[original-url] instead of retrying the same URL."""
|
| 24 |
|
| 25 |
+
SYSTEM_PROMPT += """
|
| 26 |
+
Your code block must start with exactly <code> (no characters before it, not even a period or space) and end with exactly </code>. Do not add any punctuation immediately before <code> or after </code>."""
|
| 27 |
# --- Basic Agent Definition ---
|
| 28 |
import time
|
| 29 |
|
|
|
|
| 39 |
self.agent = CodeAgent(
|
| 40 |
tools=[DuckDuckGoSearchTool(max_results=2),VisitWebpageTool()], # très limité
|
| 41 |
model=self.model,
|
| 42 |
+
max_steps=6 # empêche l'historique de grossir trop
|
| 43 |
)
|
| 44 |
|
| 45 |
def __call__(self, question: str) -> str:
|