Spaces:
Sleeping
Sleeping
connect retrivers into langgraph
Browse files- Alfred_Agent.py +3 -1
Alfred_Agent.py
CHANGED
|
@@ -93,10 +93,12 @@ builder = StateGraph(AgentState)
|
|
| 93 |
|
| 94 |
# Define nodes: these do the work
|
| 95 |
builder.add_node("assistant", assistant)
|
|
|
|
| 96 |
builder.add_node("tools", ToolNode(tools))
|
| 97 |
|
| 98 |
# Define edges: these determine how the control flow moves
|
| 99 |
-
builder.add_edge(START, "
|
|
|
|
| 100 |
builder.add_conditional_edges(
|
| 101 |
"assistant",
|
| 102 |
# If the latest message requires a tool, route to tools
|
|
|
|
| 93 |
|
| 94 |
# Define nodes: these do the work
|
| 95 |
builder.add_node("assistant", assistant)
|
| 96 |
+
builder.add_node("retriever", retriever)
|
| 97 |
builder.add_node("tools", ToolNode(tools))
|
| 98 |
|
| 99 |
# Define edges: these determine how the control flow moves
|
| 100 |
+
builder.add_edge(START, "retriever")
|
| 101 |
+
builder.add_edge("retriever", "assistant")
|
| 102 |
builder.add_conditional_edges(
|
| 103 |
"assistant",
|
| 104 |
# If the latest message requires a tool, route to tools
|