markdown-flow 0.2.13__tar.gz → 0.2.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of markdown-flow might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-flow
3
- Version: 0.2.13
3
+ Version: 0.2.14
4
4
  Summary: An agent library designed to parse and process MarkdownFlow documents
5
5
  Project-URL: Homepage, https://github.com/ai-shifu/markdown-flow-agent-py
6
6
  Project-URL: Bug Tracker, https://github.com/ai-shifu/markdown-flow-agent-py/issues
@@ -83,4 +83,4 @@ __all__ = [
83
83
  "replace_variables_in_text",
84
84
  ]
85
85
 
86
- __version__ = "0.2.13"
86
+ __version__ = "0.2.14"
@@ -925,43 +925,61 @@ Original Error: {error_message}
925
925
  # System prompt for detection
926
926
  system_prompt = """You are an intelligent document processing assistant specializing in creating interactive forms.
927
927
 
928
- Task: Analyze the given content block and determine if it needs to be converted to an interaction block to collect user information.
928
+ Task: Analyze the given content block and determine if it needs to be converted to an interaction block.
929
929
 
930
- **Core Principle**: Only convert when the text indicates a need to COLLECT and STORE user input into a variable (usually marked with {{variable_name}} or similar patterns).
930
+ **CORE PRINCIPLE**: Focus on INTENT and PATTERNS, not specific keywords.
931
931
 
932
- Judgment criteria for CONVERSION:
933
- 1. **Variable Storage Requirement**: The text explicitly or implicitly mentions:
934
- - Storing user input into a variable (e.g., "record to {{style}}", "save as {{preference}}")
935
- - Collecting information for later use in the workflow
936
- - Building user profile or preferences that will be referenced later
932
+ **CONVERSION REQUIRED when the text shows:**
937
933
 
938
- 2. **Data Collection Intent**: The interaction aims to:
939
- - Gather user choices that will affect subsequent steps
940
- - Collect structured information that needs to be preserved
941
- - Create reusable data points for the conversation flow
934
+ 1. **Collection Pattern**:
935
+ - PATTERN: [Action verb] + [choices/options] + [storage indicator]
936
+ - PATTERN: Request for user input/selection/choice + destination variable
937
+ - PATTERN: Interactive UI request with specific options
942
938
 
943
- DO NOT convert if:
944
- - The text only describes an action or recommendation without collecting input
945
- - It's showing/displaying information based on existing variables (e.g., "based on {{history}}")
946
- - It's a simple question without the need to store the response
947
- - The text is performing an operation using already collected data
939
+ 2. **Storage Indicators** (language-agnostic):
940
+ - Presence of target variable for NEW data: {{new_variable}}
941
+ - Assignment operators or arrows: →, =>, "to", "into", "as"
942
+ - Save/store/record semantics in ANY language
948
943
 
949
- Examples:
950
- Don't convert: "询问想了解的朝代:"
951
- (Simple inquiry, no storage indicated)
944
+ 3. **Interactive Intent Signals**:
945
+ - Imperative mood requesting user action
946
+ - Multiple specific options provided (not just descriptions)
947
+ - Form-like structure with fields to fill
952
948
 
953
- Don't convert: "根据{{history}}的选择推荐选这个朝代的皇帝或者年号"
954
- (Using existing variable, not collecting new data)
949
+ **DO NOT CONVERT when the text shows:**
955
950
 
956
- Convert: "根据用户提供{{故事类型}},进一步询问用户故事风格,比如幽默,搞笑,文言文等.并且记录到{{风格}}"
957
- (Explicitly mentions collecting and storing to {{风格}})
951
+ 1. **Display/Reference Pattern**:
952
+ - PATTERN: Using {{existing_var}} + display/list/show action
953
+ - PATTERN: Information presentation without collection
954
+ - Keywords suggesting reference/viewing (regardless of language):
955
+ * "for reference", "供参考", "zur Referenz", "pour référence"
956
+ * "display", "show", "list", "罗列", "afficher", "anzeigen"
958
957
 
959
- Convert: "请选择您的偏好并保存到{{user_preference}}"
960
- (Clear intent to store user input)
958
+ 2. **Information Flow**:
959
+ - Data flows FROM variable TO display (not from user to variable)
960
+ - Descriptive or explanatory content
961
+ - Recommendations or suggestions without explicit selection request
961
962
 
962
- Key indicator: Look for phrases like "记录到", "保存为", "存储到", "collect as", "save to", or the presence of target variables {{}} for storing new input.
963
+ **Language-Agnostic Examples**:
963
964
 
964
- If conversion is needed, generate a STANDARD interaction block format with SPECIFIC options based on the document-level instructions and context provided in the user message."""
965
+ Don't convert (any language):
966
+ - "Based on {{history}}, list/display/show [items] for reference"
967
+ - "根据{{history}}的选择,罗列该朝代的皇帝或者年号,供用户参考"
968
+ - "Selon {{history}}, afficher les empereurs pour référence"
969
+
970
+ ✅ Convert (any language):
971
+ - "Ask user to select [option] and save to {{variable}}"
972
+ - "让用户选择风格并记录到{{style}}"
973
+ - "Create buttons: Yes/No" (implies interaction needed)
974
+ - "Demander à l'utilisateur de choisir et enregistrer dans {{choix}}"
975
+
976
+ **Decision Rule**:
977
+ Look for the SEMANTIC INTENT, not specific words:
978
+ - Is NEW information being COLLECTED from user? → Convert
979
+ - Is EXISTING information being DISPLAYED to user? → Don't convert
980
+ - When uncertain, check: Does this create a new {{variable}} or just use existing ones?
981
+
982
+ If conversion is needed, generate a STANDARD interaction block format."""
965
983
 
966
984
  # User message with content and context
967
985
  # Build user prompt with document context
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-flow
3
- Version: 0.2.13
3
+ Version: 0.2.14
4
4
  Summary: An agent library designed to parse and process MarkdownFlow documents
5
5
  Project-URL: Homepage, https://github.com/ai-shifu/markdown-flow-agent-py
6
6
  Project-URL: Bug Tracker, https://github.com/ai-shifu/markdown-flow-agent-py/issues
File without changes
File without changes
File without changes