Update agent.py
Browse files
agent.py
CHANGED
|
@@ -47,8 +47,13 @@ class BasicAgent():
|
|
| 47 |
return answer
|
| 48 |
|
| 49 |
def assistant(state: AgentState):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
return {
|
| 51 |
-
"messages": [chat_with_tools.invoke(state["messages"])],
|
| 52 |
}
|
| 53 |
|
| 54 |
|
|
|
|
| 47 |
return answer
|
| 48 |
|
| 49 |
def assistant(state: AgentState):
|
| 50 |
+
prompt = """When providing the final answer, be as concise as possible, provide only the required final answer. For example:
|
| 51 |
+
QUESTION: What was the actual enrollment count of the clinical trial on H. pylori in acne vulgaris patients from Jan-May 2018 as listed on the NIH website?
|
| 52 |
+
FINAL ANSWER: 90
|
| 53 |
+
|
| 54 |
+
"""
|
| 55 |
return {
|
| 56 |
+
"messages": [chat_with_tools.invoke(prompt + state["messages"])],
|
| 57 |
}
|
| 58 |
|
| 59 |
|