Update app.py
Browse files
app.py
CHANGED
|
@@ -29,17 +29,6 @@ class BasicAgent:
|
|
| 29 |
model=model,
|
| 30 |
tools=my_tool_list,
|
| 31 |
max_steps=3,
|
| 32 |
-
system_prompt=(
|
| 33 |
-
"You are Celum,an AI with advanced interaction capabilities."
|
| 34 |
-
"Now you're taking an exam to test your abilitiy in solving real-word problems . "
|
| 35 |
-
"For every question, output ONLY the answer in the exact format required. "
|
| 36 |
-
"NO explanation, NO markdown, NO extra words, NO formatting."
|
| 37 |
-
"For numeric questions, output ONLY the number. "
|
| 38 |
-
"For list questions, output ONLY the list in the requested format. "
|
| 39 |
-
"If the question asks for a single word, output ONLY the word. "
|
| 40 |
-
"If you cannot answer, output ONLY: unknown. "
|
| 41 |
-
"DO NOT add any explanation or context—only output the answer exactly."
|
| 42 |
-
)
|
| 43 |
)
|
| 44 |
|
| 45 |
|
|
@@ -49,7 +38,16 @@ class BasicAgent:
|
|
| 49 |
else:
|
| 50 |
print(f"{self.agent_name} received question: {question[:80]}...")
|
| 51 |
try:
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
except Exception as e:
|
| 54 |
return f"[{self.agent_name} Error: {e}]"
|
| 55 |
|
|
|
|
| 29 |
model=model,
|
| 30 |
tools=my_tool_list,
|
| 31 |
max_steps=3,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
|
|
|
|
| 38 |
else:
|
| 39 |
print(f"{self.agent_name} received question: {question[:80]}...")
|
| 40 |
try:
|
| 41 |
+
# system prompt + question
|
| 42 |
+
system_prompt = (
|
| 43 |
+
"You are Celum, an AI assistant with advanced interaction capabilities and unique personality. "
|
| 44 |
+
"Now you are taking a rigorous exam that tests your ability to solve real-world problems. "
|
| 45 |
+
"You MUST answer ONLY with the final answer in the exact format required by the question, with NO explanation, NO markdown, and NO extra words. "
|
| 46 |
+
"If you cannot answer, return the word 'unknown'. "
|
| 47 |
+
"DO NOT add any explanation or context—only output the answer exactly.\n\n"
|
| 48 |
+
)
|
| 49 |
+
full_question = system_prompt + question
|
| 50 |
+
return self.agent.run(full_question)
|
| 51 |
except Exception as e:
|
| 52 |
return f"[{self.agent_name} Error: {e}]"
|
| 53 |
|