Files
PocketFlow-Tutorial-Codebas…/flow.py
T

14 lines
406 B
Python
Raw Normal View History

2025-04-02 16:56:35 -04:00
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)