markdown-flow 0.2.79__tar.gz → 0.2.80__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.
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/PKG-INFO +1 -1
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/__init__.py +1 -2
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/core.py +28 -26
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/system_prompt.md +1 -1
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow.egg-info/PKG-INFO +1 -1
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/LICENSE +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/README.md +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/constants.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/constants_system_prompt.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/enums.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/exceptions.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/formatter/__init__.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/formatter/classifier.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/formatter/format.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/formatter/patterns.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/formatter/stream.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/formatter/types.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/llm.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/models.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/__init__.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/code_fence_utils.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/html_comment_utils.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/interaction.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/json_parser.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/output.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/preprocessor.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/validation.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/parser/variable.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/providers/__init__.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/providers/config.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/providers/openai.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/tag_filter.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow/utils.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow.egg-info/SOURCES.txt +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow.egg-info/dependency_links.txt +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/markdown_flow.egg-info/top_level.txt +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/pyproject.toml +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/setup.cfg +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_dynamic_interaction.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_formatter.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_formatter_stream.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_html_comment_utils.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_markdownflow_basic.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_parser_interaction.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_parser_output.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_parser_variable.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_preprocessor.py +0 -0
- {markdown_flow-0.2.79 → markdown_flow-0.2.80}/tests/test_preserved_simple.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-flow
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.80
|
|
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
|
|
@@ -666,43 +666,45 @@ class MarkdownFlow:
|
|
|
666
666
|
|
|
667
667
|
# Extract translatable content (JSON format)
|
|
668
668
|
translatable_json, interaction_info = self._extract_translatable_content(processed_block.content)
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
669
|
+
|
|
670
|
+
def _render_as_is(*, translation_skipped: bool = False):
|
|
671
|
+
"""Return the interaction content unchanged, honoring the mode.
|
|
672
|
+
|
|
673
|
+
STREAM mode must return a generator yielding LLMResult (callers
|
|
674
|
+
iterate the result); COMPLETE returns the LLMResult directly.
|
|
675
|
+
"""
|
|
676
|
+
metadata = {
|
|
677
|
+
"block_type": "interaction",
|
|
678
|
+
"block_index": block_index,
|
|
679
|
+
}
|
|
680
|
+
if translation_skipped:
|
|
681
|
+
metadata["translation_skipped"] = True
|
|
682
|
+
result = LLMResult(
|
|
672
683
|
content=processed_block.content,
|
|
673
684
|
type=ElementType.INTERACTION,
|
|
674
685
|
number=block_index,
|
|
675
|
-
metadata=
|
|
676
|
-
"block_type": "interaction",
|
|
677
|
-
"block_index": block_index,
|
|
678
|
-
},
|
|
686
|
+
metadata=metadata,
|
|
679
687
|
)
|
|
688
|
+
if mode == ProcessMode.STREAM:
|
|
689
|
+
|
|
690
|
+
def stream_generator():
|
|
691
|
+
yield result
|
|
692
|
+
|
|
693
|
+
return stream_generator()
|
|
694
|
+
return result
|
|
695
|
+
|
|
696
|
+
if not interaction_info:
|
|
697
|
+
# Parse failed, return original content
|
|
698
|
+
return _render_as_is()
|
|
680
699
|
|
|
681
700
|
# If no translatable content, return directly
|
|
682
701
|
if not translatable_json or translatable_json == "{}":
|
|
683
|
-
return
|
|
684
|
-
content=processed_block.content,
|
|
685
|
-
type=ElementType.INTERACTION,
|
|
686
|
-
number=block_index,
|
|
687
|
-
metadata={
|
|
688
|
-
"block_type": "interaction",
|
|
689
|
-
"block_index": block_index,
|
|
690
|
-
},
|
|
691
|
-
)
|
|
702
|
+
return _render_as_is()
|
|
692
703
|
|
|
693
704
|
# If no output language is configured, skip translation entirely:
|
|
694
705
|
# return the interaction content as-is without any LLM call.
|
|
695
706
|
if not self._output_language:
|
|
696
|
-
return
|
|
697
|
-
content=processed_block.content,
|
|
698
|
-
type=ElementType.INTERACTION,
|
|
699
|
-
number=block_index,
|
|
700
|
-
metadata={
|
|
701
|
-
"block_type": "interaction",
|
|
702
|
-
"block_index": block_index,
|
|
703
|
-
"translation_skipped": True,
|
|
704
|
-
},
|
|
705
|
-
)
|
|
707
|
+
return _render_as_is(translation_skipped=True)
|
|
706
708
|
|
|
707
709
|
# Build translation messages
|
|
708
710
|
messages = self._build_translation_messages(translatable_json)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-flow
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.80
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|