Update agent.py
Browse files
agent.py
CHANGED
|
@@ -21,7 +21,7 @@ class BasicAgent():
|
|
| 21 |
search_tool = DuckDuckGoSearchRun()
|
| 22 |
vision_llm = ChatOpenAI(model="gpt-4o")
|
| 23 |
self.tools = [extract_text,search_tool]
|
| 24 |
-
chat_with_tools = chat.bind_tools(self.tools)
|
| 25 |
self._initialize_graph()
|
| 26 |
print("BasicAgent initialized.")
|
| 27 |
|
|
@@ -55,7 +55,7 @@ class BasicAgent():
|
|
| 55 |
|
| 56 |
"""
|
| 57 |
return {
|
| 58 |
-
"messages": [chat_with_tools.invoke(prompt + state["messages"])],
|
| 59 |
}
|
| 60 |
|
| 61 |
|
|
|
|
| 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.")
|
| 27 |
|
|
|
|
| 55 |
|
| 56 |
"""
|
| 57 |
return {
|
| 58 |
+
"messages": [self.chat_with_tools.invoke(prompt + state["messages"])],
|
| 59 |
}
|
| 60 |
|
| 61 |
|