Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -33,12 +33,14 @@ class BasicAgent:
|
|
| 33 |
"If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. "
|
| 34 |
"If you are asked for a comma separated list, apply the above rules depending on whether the element to be put in the list is a number or a string."
|
| 35 |
)
|
| 36 |
-
prompt = f"{system_prompt}
|
| 37 |
|
| 38 |
Context: {context}
|
| 39 |
|
| 40 |
Question: {question}
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
try:
|
| 43 |
result = self.llm(prompt)[0]["generated_text"]
|
| 44 |
if "FINAL ANSWER:" in result:
|
|
|
|
| 33 |
"If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. "
|
| 34 |
"If you are asked for a comma separated list, apply the above rules depending on whether the element to be put in the list is a number or a string."
|
| 35 |
)
|
| 36 |
+
prompt = f"""{system_prompt}
|
| 37 |
|
| 38 |
Context: {context}
|
| 39 |
|
| 40 |
Question: {question}
|
| 41 |
+
|
| 42 |
+
Answer:"""
|
| 43 |
+
|
| 44 |
try:
|
| 45 |
result = self.llm(prompt)[0]["generated_text"]
|
| 46 |
if "FINAL ANSWER:" in result:
|