Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -6,6 +6,7 @@ from langgraph.graph import START, StateGraph
|
|
| 6 |
from langgraph.prebuilt import tools_condition
|
| 7 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 8 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
|
|
|
| 9 |
|
| 10 |
# Generate the chat interface, including the tools
|
| 11 |
llm = HuggingFaceEndpoint(
|
|
@@ -14,7 +15,11 @@ llm = HuggingFaceEndpoint(
|
|
| 14 |
)
|
| 15 |
|
| 16 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
chat_with_tools = chat.bind_tools(tools)
|
| 19 |
|
| 20 |
# Generate the AgentState and Agent graph
|
|
|
|
| 6 |
from langgraph.prebuilt import tools_condition
|
| 7 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 8 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 9 |
+
from tools import *
|
| 10 |
|
| 11 |
# Generate the chat interface, including the tools
|
| 12 |
llm = HuggingFaceEndpoint(
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 18 |
+
|
| 19 |
+
tools = [
|
| 20 |
+
search_tool
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
chat_with_tools = chat.bind_tools(tools)
|
| 24 |
|
| 25 |
# Generate the AgentState and Agent graph
|