Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
@@ -54,7 +54,7 @@ class GaiaAgent:
|
|
54 |
# Instruction to the LLM to perform the task and use tools.
|
55 |
# We need to build a prompt that instructs the model to use tools.
|
56 |
|
57 |
-
|
58 |
You are a helpful and expert AI assistant with access to a search tool.
|
59 |
Your task is to carefully and accurately answer questions by using the search tool when necessary.
|
60 |
Always provide a complete and correct answer based on the information you find.
|
@@ -135,4 +135,4 @@ class GaiaAgent:
|
|
135 |
current_response += f"\n\n{new_content}\n"
|
136 |
print(f"Model generated non-tool/non-answer content. Appending: {new_content[:100]}...")
|
137 |
|
138 |
-
return "Agent could not complete the task within the allowed iterations. Latest response: " + new_content.strip() if new_content else "Agent could not complete the task within the allowed iterations. No meaningful content generated."
|
|
|
54 |
# Instruction to the LLM to perform the task and use tools.
|
55 |
# We need to build a prompt that instructs the model to use tools.
|
56 |
|
57 |
+
prompt = f"""
|
58 |
You are a helpful and expert AI assistant with access to a search tool.
|
59 |
Your task is to carefully and accurately answer questions by using the search tool when necessary.
|
60 |
Always provide a complete and correct answer based on the information you find.
|
|
|
135 |
current_response += f"\n\n{new_content}\n"
|
136 |
print(f"Model generated non-tool/non-answer content. Appending: {new_content[:100]}...")
|
137 |
|
138 |
+
return "Agent could not complete the task within the allowed iterations. Latest response: " + new_content.strip() if new_content else "Agent could not complete the task within the allowed iterations. No meaningful content generated."
|