43 lines
1.5 KiB
Gherkin
43 lines
1.5 KiB
Gherkin
Feature: LangGraph Conditional Routing
|
|
As a developer using CleverAgents
|
|
I want to use conditional routing in LangGraph
|
|
So that I can create dynamic workflows
|
|
|
|
Background:
|
|
Given COMPLETELY_ISOLATED_CleverAgents_reactive_system_is_available_with_LangGraph_support_FOR_ISOLATED_TESTING
|
|
|
|
Scenario: LangGraph with conditional routing
|
|
Given COMPLETELY_ISOLATED_I_have_a_LangGraph_configuration_FOR_ISOLATED_TESTING:
|
|
"""
|
|
{
|
|
"name": "conditional_graph",
|
|
"nodes": {
|
|
"check": {
|
|
"type": "conditional",
|
|
"conditions": {
|
|
"positive": {"type": "contains", "text": "yes"},
|
|
"negative": {"type": "contains", "text": "no"}
|
|
}
|
|
},
|
|
"handle_yes": {
|
|
"type": "function",
|
|
"function": "handle_positive"
|
|
},
|
|
"handle_no": {
|
|
"type": "function",
|
|
"function": "handle_negative"
|
|
}
|
|
},
|
|
"edges": [
|
|
{"source": "start", "target": "check"},
|
|
{"source": "check", "target": "handle_yes", "condition": "positive"},
|
|
{"source": "check", "target": "handle_no", "condition": "negative"},
|
|
{"source": "handle_yes", "target": "end"},
|
|
{"source": "handle_no", "target": "end"}
|
|
]
|
|
}
|
|
"""
|
|
When COMPLETELY_ISOLATED_I_create_the_graph_FOR_ISOLATED_TESTING
|
|
Then COMPLETELY_ISOLATED_the_graph_should_be_created_successfully_FOR_ISOLATED_TESTING
|
|
And COMPLETELY_ISOLATED_the_graph_should_support_conditional_routing_FOR_ISOLATED_TESTING
|