Spaces:
Sleeping
Sleeping
Update graph_builder.py
Browse files- graph_builder.py +4 -2
graph_builder.py
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
from langgraph.graph import StateGraph
|
| 2 |
from langchain_core.tools import Tool
|
| 3 |
from langchain_community.chat_models import ChatOpenAI
|
| 4 |
-
from langchain_community.tools
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
def build_graph():
|
| 8 |
graph = StateGraph(dict)
|
| 9 |
|
| 10 |
# Setup tools
|
| 11 |
-
search =
|
|
|
|
| 12 |
|
| 13 |
def search_step(state):
|
| 14 |
question = state.get("question")
|
|
|
|
| 1 |
from langgraph.graph import StateGraph
|
| 2 |
from langchain_core.tools import Tool
|
| 3 |
from langchain_community.chat_models import ChatOpenAI
|
| 4 |
+
from langchain_community.tools import TavilySearchResults
|
| 5 |
+
|
| 6 |
|
| 7 |
|
| 8 |
def build_graph():
|
| 9 |
graph = StateGraph(dict)
|
| 10 |
|
| 11 |
# Setup tools
|
| 12 |
+
search = TavilySearchResults()
|
| 13 |
+
|
| 14 |
|
| 15 |
def search_step(state):
|
| 16 |
question = state.get("question")
|