Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
from typing import TypedDict, Annotated
|
| 2 |
-
from tool import add,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
from os import getenv
|
| 4 |
from langgraph.graph.message import add_messages
|
| 5 |
from langchain_core.messages import AnyMessage, SystemMessage, HumanMessage, AIMessage
|
|
@@ -28,10 +41,15 @@ tools = [add,
|
|
| 28 |
multiply,
|
| 29 |
divide,
|
| 30 |
DuckDuckGoSearchTool,
|
| 31 |
-
TavilySearchTool,
|
| 32 |
WikipediaSearchTool,
|
| 33 |
ArxivSearchTool,
|
| 34 |
-
PubmedSearchTool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
chat_with_tools = chat.bind_tools(tools)
|
| 37 |
|
|
|
|
| 1 |
from typing import TypedDict, Annotated
|
| 2 |
+
from tool import add,
|
| 3 |
+
substract,
|
| 4 |
+
multiply,
|
| 5 |
+
divide,
|
| 6 |
+
DuckDuckGoSearchTool,
|
| 7 |
+
TavilySearchTool,
|
| 8 |
+
WikipediaSearchTool,
|
| 9 |
+
ArxivSearchTool,
|
| 10 |
+
PubmedSearchTool,
|
| 11 |
+
save_and_read_file,
|
| 12 |
+
download_file_from_url,
|
| 13 |
+
extract_text_from_image,
|
| 14 |
+
analyze_csv_file,
|
| 15 |
+
analyse_excel_file
|
| 16 |
from os import getenv
|
| 17 |
from langgraph.graph.message import add_messages
|
| 18 |
from langchain_core.messages import AnyMessage, SystemMessage, HumanMessage, AIMessage
|
|
|
|
| 41 |
multiply,
|
| 42 |
divide,
|
| 43 |
DuckDuckGoSearchTool,
|
| 44 |
+
TavilySearchTool,
|
| 45 |
WikipediaSearchTool,
|
| 46 |
ArxivSearchTool,
|
| 47 |
+
PubmedSearchTool,
|
| 48 |
+
save_and_read_file,
|
| 49 |
+
download_file_from_url,
|
| 50 |
+
extract_text_from_image,
|
| 51 |
+
analyze_csv_file,
|
| 52 |
+
analyse_excel_file]
|
| 53 |
|
| 54 |
chat_with_tools = chat.bind_tools(tools)
|
| 55 |
|