Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:44:08 +08:00
commit 12f823b4a9
24 changed files with 4951 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
"""
PocketFlow Template - Flow Definition
Source: https://github.com/The-Pocket/PocketFlow-Template-Python
This module defines the QA flow by connecting nodes.
"""
from pocketflow import Flow
from nodes import GetQuestionNode, AnswerNode
def create_qa_flow():
"""
Create a simple Question-Answer flow
Flow structure:
GetQuestionNode >> AnswerNode
Returns:
Flow: Configured QA flow
"""
# Create nodes
get_question_node = GetQuestionNode()
answer_node = AnswerNode()
# Connect nodes sequentially
get_question_node >> answer_node
# Create flow with start node
qa_flow = Flow(start=get_question_node)
return qa_flow
# For direct module execution
qa_flow = create_qa_flow()