Update agent.py
Browse files
agent.py
CHANGED
|
@@ -20,7 +20,7 @@ class BasicAgent():
|
|
| 20 |
|
| 21 |
search_tool = DuckDuckGoSearchRun()
|
| 22 |
vision_llm = ChatOpenAI(model="gpt-4o")
|
| 23 |
-
self.tools = [extract_text,search_tool]
|
| 24 |
self.chat_with_tools = chat.bind_tools(self.tools)
|
| 25 |
self._initialize_graph()
|
| 26 |
print("BasicAgent initialized.")
|
|
@@ -49,7 +49,9 @@ class BasicAgent():
|
|
| 49 |
return answer
|
| 50 |
|
| 51 |
def assistant(self,state: AgentState):
|
| 52 |
-
prompt = """
|
|
|
|
|
|
|
| 53 |
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?
|
| 54 |
FINAL ANSWER: 90
|
| 55 |
|
|
|
|
| 20 |
|
| 21 |
search_tool = DuckDuckGoSearchRun()
|
| 22 |
vision_llm = ChatOpenAI(model="gpt-4o")
|
| 23 |
+
self.tools = [extract_text, search_tool]
|
| 24 |
self.chat_with_tools = chat.bind_tools(self.tools)
|
| 25 |
self._initialize_graph()
|
| 26 |
print("BasicAgent initialized.")
|
|
|
|
| 49 |
return answer
|
| 50 |
|
| 51 |
def assistant(self,state: AgentState):
|
| 52 |
+
prompt = """Please reason step by step.
|
| 53 |
+
|
| 54 |
+
When providing the final answer, be as concise as possible, provide only the FINAL ANSWER. For example:
|
| 55 |
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?
|
| 56 |
FINAL ANSWER: 90
|
| 57 |
|