Spaces:
Sleeping
Sleeping
shovan777 commited on
Commit ·
bbe5283
1
Parent(s): 6db4f79
Prompt the agent to give short answers.
Browse files
app.py
CHANGED
|
@@ -45,8 +45,15 @@ class BasicAgent:
|
|
| 45 |
)
|
| 46 |
|
| 47 |
def __call__(self, question: str) -> str:
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
print(f"Agent returning fixed answer: {answer}")
|
| 51 |
return answer
|
| 52 |
|
|
|
|
| 45 |
)
|
| 46 |
|
| 47 |
def __call__(self, question: str) -> str:
|
| 48 |
+
prompt = """
|
| 49 |
+
You are a top quiz agent, you give short answers to questions.
|
| 50 |
+
Provide answer in either a string or a number, no explanation.
|
| 51 |
+
Answer the following question:
|
| 52 |
+
{question}
|
| 53 |
+
If you don't know the answer, just say "I don't know".
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
answer = self.agent.run(prompt.format(question=question))
|
| 57 |
print(f"Agent returning fixed answer: {answer}")
|
| 58 |
return answer
|
| 59 |
|