mirror of
https://github.com/aljazceru/Tutorial-Codebase-Knowledge.git
synced 2025-12-18 23:14:21 +01:00
Initial commit
This commit is contained in:
14
flow.py
Normal file
14
flow.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from pocketflow import Flow
|
||||
from nodes import GetQuestionNode, AnswerNode
|
||||
|
||||
def create_qa_flow():
|
||||
"""Create and return a question-answering flow."""
|
||||
# Create nodes
|
||||
get_question_node = GetQuestionNode()
|
||||
answer_node = AnswerNode()
|
||||
|
||||
# Connect nodes in sequence
|
||||
get_question_node >> answer_node
|
||||
|
||||
# Create flow starting with input node
|
||||
return Flow(start=get_question_node)
|
||||
Reference in New Issue
Block a user