Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -165,7 +165,7 @@ class FileAttachmentQueryTool(Tool):
|
|
| 165 |
|
| 166 |
# --- Basic Agent Definition ---
|
| 167 |
class BasicAgent:
|
| 168 |
-
def __init__(self, provider="
|
| 169 |
print("BasicAgent initialized.")
|
| 170 |
model = self.select_model(provider)
|
| 171 |
client = InferenceClientModel()
|
|
@@ -183,7 +183,7 @@ class BasicAgent:
|
|
| 183 |
model=model,
|
| 184 |
tools=tools,
|
| 185 |
add_base_tools=False,
|
| 186 |
-
max_steps=
|
| 187 |
)
|
| 188 |
self.agent.system_prompt = (
|
| 189 |
"""
|
|
@@ -198,6 +198,7 @@ class BasicAgent:
|
|
| 198 |
- If proving something, compute step-by-step internally but output only the final result in the required format.
|
| 199 |
- If tool outputs are verbose, extract only the essential answer that satisfies the question.
|
| 200 |
- Under no circumstances include explanations, intermediate steps, or text outside the 'FINAL ANSWER: [ANSWER]' format.
|
|
|
|
| 201 |
|
| 202 |
Example:
|
| 203 |
Question: What is 2 + 2?
|
|
|
|
| 165 |
|
| 166 |
# --- Basic Agent Definition ---
|
| 167 |
class BasicAgent:
|
| 168 |
+
def __init__(self, provider="deepseek"):
|
| 169 |
print("BasicAgent initialized.")
|
| 170 |
model = self.select_model(provider)
|
| 171 |
client = InferenceClientModel()
|
|
|
|
| 183 |
model=model,
|
| 184 |
tools=tools,
|
| 185 |
add_base_tools=False,
|
| 186 |
+
max_steps=12,
|
| 187 |
)
|
| 188 |
self.agent.system_prompt = (
|
| 189 |
"""
|
|
|
|
| 198 |
- If proving something, compute step-by-step internally but output only the final result in the required format.
|
| 199 |
- If tool outputs are verbose, extract only the essential answer that satisfies the question.
|
| 200 |
- Under no circumstances include explanations, intermediate steps, or text outside the 'FINAL ANSWER: [ANSWER]' format.
|
| 201 |
+
- The first character of the answer has to be uppercase.
|
| 202 |
|
| 203 |
Example:
|
| 204 |
Question: What is 2 + 2?
|