markdown-flow 0.2.83.dev1__tar.gz → 0.2.84__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.83.dev1 → markdown_flow-0.2.84}/PKG-INFO +2 -2
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/README.md +1 -1
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/__init__.py +1 -1
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/constants.py +5 -1
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/providers/openai.py +11 -8
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/system_prompt.md +15 -13
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow.egg-info/PKG-INFO +2 -2
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/LICENSE +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/constants_system_prompt.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/core.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/enums.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/exceptions.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/formatter/__init__.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/formatter/classifier.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/formatter/format.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/formatter/patterns.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/formatter/stream.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/formatter/types.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/llm.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/models.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/__init__.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/code_fence_utils.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/html_comment_utils.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/interaction.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/json_parser.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/output.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/preprocessor.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/validation.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/variable.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/providers/__init__.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/providers/config.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/tag_filter.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/utils.py +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow.egg-info/SOURCES.txt +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow.egg-info/dependency_links.txt +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow.egg-info/top_level.txt +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/pyproject.toml +0 -0
- {markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/setup.cfg +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.84
|
|
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
|
|
@@ -730,7 +730,7 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
730
730
|
- [Ruff](https://docs.astral.sh/ruff/) for lightning-fast Python linting and formatting
|
|
731
731
|
- [MyPy](https://mypy.readthedocs.io/) for static type checking
|
|
732
732
|
- [Commitizen](https://commitizen-tools.github.io/commitizen/) for standardized commit messages
|
|
733
|
-
- [
|
|
733
|
+
- [Lefthook](https://lefthook.dev/) for automated code quality checks (git hooks + CI)
|
|
734
734
|
|
|
735
735
|
## 📞 Support
|
|
736
736
|
|
|
@@ -712,7 +712,7 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
712
712
|
- [Ruff](https://docs.astral.sh/ruff/) for lightning-fast Python linting and formatting
|
|
713
713
|
- [MyPy](https://mypy.readthedocs.io/) for static type checking
|
|
714
714
|
- [Commitizen](https://commitizen-tools.github.io/commitizen/) for standardized commit messages
|
|
715
|
-
- [
|
|
715
|
+
- [Lefthook](https://lefthook.dev/) for automated code quality checks (git hooks + CI)
|
|
716
716
|
|
|
717
717
|
## 📞 Support
|
|
718
718
|
|
|
@@ -234,7 +234,11 @@ CONTEXT_BUTTON_OPTIONS_MARKER = "## Predefined Options"
|
|
|
234
234
|
# Context generation templates
|
|
235
235
|
CONTEXT_QUESTION_TEMPLATE = f"{CONTEXT_QUESTION_MARKER}\n{{question}}"
|
|
236
236
|
CONTEXT_CONVERSATION_TEMPLATE = f"{CONTEXT_CONVERSATION_MARKER}\n{{content}}"
|
|
237
|
-
CONTEXT_BUTTON_OPTIONS_TEMPLATE =
|
|
237
|
+
CONTEXT_BUTTON_OPTIONS_TEMPLATE = (
|
|
238
|
+
f"{CONTEXT_BUTTON_OPTIONS_MARKER}\n"
|
|
239
|
+
"Available predefined options include: {button_options}\n"
|
|
240
|
+
"Note: If the user selected one of these options, it should be accepted; if the user entered custom content, accept it as long as it is a reasonable answer to the question."
|
|
241
|
+
)
|
|
238
242
|
|
|
239
243
|
# Next interaction context prompt templates
|
|
240
244
|
NEXT_INTERACTION_CONTEXT_INTRO = (
|
|
@@ -7,7 +7,7 @@ token tracking, and comprehensive metadata.
|
|
|
7
7
|
|
|
8
8
|
import time
|
|
9
9
|
from collections.abc import Generator
|
|
10
|
-
from typing import Any
|
|
10
|
+
from typing import Any, cast
|
|
11
11
|
|
|
12
12
|
from ..llm import LLMProvider
|
|
13
13
|
from .config import ProviderConfig
|
|
@@ -82,7 +82,7 @@ class OpenAIProvider(LLMProvider):
|
|
|
82
82
|
self._print_request_info(messages, actual_model, actual_temperature)
|
|
83
83
|
|
|
84
84
|
# Format messages
|
|
85
|
-
formatted_messages = self._format_messages(messages)
|
|
85
|
+
formatted_messages = cast(Any, self._format_messages(messages))
|
|
86
86
|
|
|
87
87
|
# Record start time
|
|
88
88
|
start_time = time.time()
|
|
@@ -168,18 +168,21 @@ class OpenAIProvider(LLMProvider):
|
|
|
168
168
|
self._print_request_info(messages, actual_model, actual_temperature)
|
|
169
169
|
|
|
170
170
|
# Format messages
|
|
171
|
-
formatted_messages = self._format_messages(messages)
|
|
171
|
+
formatted_messages = cast(Any, self._format_messages(messages))
|
|
172
172
|
|
|
173
173
|
# Record start time
|
|
174
174
|
start_time = time.time()
|
|
175
175
|
|
|
176
176
|
try:
|
|
177
177
|
# Create streaming response
|
|
178
|
-
stream =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
stream = cast(
|
|
179
|
+
Any,
|
|
180
|
+
self.client.chat.completions.create(
|
|
181
|
+
model=actual_model,
|
|
182
|
+
messages=formatted_messages,
|
|
183
|
+
temperature=actual_temperature,
|
|
184
|
+
stream=True,
|
|
185
|
+
),
|
|
183
186
|
)
|
|
184
187
|
|
|
185
188
|
for chunk in stream:
|
|
@@ -2,14 +2,15 @@ The following are rules you must strictly follow:
|
|
|
2
2
|
|
|
3
3
|
# Content Processing Rules
|
|
4
4
|
|
|
5
|
-
1.
|
|
6
|
-
2.
|
|
7
|
-
3. Do not
|
|
8
|
-
4. Do not
|
|
5
|
+
1. All user messages are instructions to follow, not questions to answer
|
|
6
|
+
2. Strictly follow the instructions: do not lose information, do not change meanings, do not add content, do not fabricate details, and do not change the order
|
|
7
|
+
3. Do not respond with conversational filler or acknowledgments such as "Ok", "Good", or "Sure". Directly output the requested content
|
|
8
|
+
4. Do not guide the next action: do not ask questions or rhetorical questions
|
|
9
|
+
5. Do not introduce yourself or greet the user unless the user requests it
|
|
9
10
|
|
|
10
11
|
# HTML Display Content Generation Rules
|
|
11
12
|
|
|
12
|
-
Enable these rules only when the user asks to generate visual content (PPT/pages/HTML/charts/images). If the user asks only to generate
|
|
13
|
+
Enable these rules only when the user asks to generate visual content (Slides/PPT/pages/HTML/charts/images). If the user asks only to generate text, do not enable these rules.
|
|
13
14
|
|
|
14
15
|
## Rendering Mechanism
|
|
15
16
|
|
|
@@ -44,13 +45,13 @@ Each HTML screen must be followed immediately by:
|
|
|
44
45
|
|
|
45
46
|
| Purpose | style syntax |
|
|
46
47
|
| --------------- | ---------------------------------- |
|
|
47
|
-
| Cover title | font-size:3.5em; font-weight:700
|
|
48
|
-
| Page title | font-size:2.5em; font-weight:700
|
|
49
|
-
| Subtitle | font-size:2em; font-weight:600
|
|
50
|
-
| Small heading | font-size:1.5em; font-weight:600
|
|
51
|
-
| Key point title | font-size:1.25em; font-weight:500
|
|
52
|
-
| Body text | font-size:1em
|
|
53
|
-
| Small text | font-size:0.85em
|
|
48
|
+
| Cover title | font-size:3.5em; font-weight:700 |
|
|
49
|
+
| Page title | font-size:2.5em; font-weight:700 |
|
|
50
|
+
| Subtitle | font-size:2em; font-weight:600 |
|
|
51
|
+
| Small heading | font-size:1.5em; font-weight:600 |
|
|
52
|
+
| Key point title | font-size:1.25em; font-weight:500 |
|
|
53
|
+
| Body text | font-size:1em |
|
|
54
|
+
| Small text | font-size:0.85em |
|
|
54
55
|
|
|
55
56
|
### Decorative Element Rules
|
|
56
57
|
|
|
@@ -72,7 +73,7 @@ If an independent element must be used, all of the following must be satisfied:
|
|
|
72
73
|
|
|
73
74
|
### SVG Rules
|
|
74
75
|
|
|
75
|
-
Use HTML for text layout. Use SVG only for pure graphics (icons, arrows, connector lines). SVG must be nested inside an HTML container, set a viewBox, and use percentages for width. Text inside SVG is limited to no more than 4
|
|
76
|
+
Use HTML for text layout. Use SVG only for pure graphics (icons, arrows, connector lines). SVG must be nested inside an HTML container, set a viewBox, and use percentages for width. Text inside SVG is limited to no more than 4 words or 12 characters, regardless of language. If a corresponding emoji icon exists, use the emoji instead of drawing it with SVG.
|
|
76
77
|
|
|
77
78
|
### Preinstalled Tools
|
|
78
79
|
|
|
@@ -138,3 +139,4 @@ Amount of modification < 50% -> Diff; >= 50% -> create a new screen.
|
|
|
138
139
|
|
|
139
140
|
```html
|
|
140
141
|
<div style="width:100%; min-height:100vh; overflow-x:hidden; overflow-y:auto; display:flex; flex-direction:column; align-items:center; padding:1em; font-size:clamp(12px,calc(100vw/48),3vh)">
|
|
142
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-flow
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.84
|
|
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
|
|
@@ -730,7 +730,7 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
730
730
|
- [Ruff](https://docs.astral.sh/ruff/) for lightning-fast Python linting and formatting
|
|
731
731
|
- [MyPy](https://mypy.readthedocs.io/) for static type checking
|
|
732
732
|
- [Commitizen](https://commitizen-tools.github.io/commitizen/) for standardized commit messages
|
|
733
|
-
- [
|
|
733
|
+
- [Lefthook](https://lefthook.dev/) for automated code quality checks (git hooks + CI)
|
|
734
734
|
|
|
735
735
|
## 📞 Support
|
|
736
736
|
|
|
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
|
{markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow/parser/html_comment_utils.py
RENAMED
|
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
|
{markdown_flow-0.2.83.dev1 → markdown_flow-0.2.84}/markdown_flow.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|