django-spire 0.18.2__py3-none-any.whl → 0.18.3__py3-none-any.whl
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.
- django_spire/consts.py +1 -1
- django_spire/knowledge/entry/version/converters/docx_converter.py +1 -3
- django_spire/knowledge/entry/version/intelligence/bots/markdown_format_llm_bot.py +3 -1
- {django_spire-0.18.2.dist-info → django_spire-0.18.3.dist-info}/METADATA +1 -1
- {django_spire-0.18.2.dist-info → django_spire-0.18.3.dist-info}/RECORD +8 -8
- {django_spire-0.18.2.dist-info → django_spire-0.18.3.dist-info}/WHEEL +0 -0
- {django_spire-0.18.2.dist-info → django_spire-0.18.3.dist-info}/licenses/LICENSE.md +0 -0
- {django_spire-0.18.2.dist-info → django_spire-0.18.3.dist-info}/top_level.txt +0 -0
django_spire/consts.py
CHANGED
|
@@ -44,13 +44,11 @@ class DocxConverter(BaseConverter):
|
|
|
44
44
|
for i in range(0, len(markdown_content), MARKDOWN_AI_CHUNK_SIZE)
|
|
45
45
|
]
|
|
46
46
|
|
|
47
|
-
markdown_format_bot = MarkdownFormatLlmBot()
|
|
48
|
-
|
|
49
47
|
with ThreadPoolExecutor(max_workers=4) as executor:
|
|
50
48
|
futures = []
|
|
51
49
|
for idx, chunk in enumerate(markdown_content_chunks):
|
|
52
50
|
future = executor.submit(
|
|
53
|
-
|
|
51
|
+
MarkdownFormatLlmBot().process,
|
|
54
52
|
markdown_content=chunk
|
|
55
53
|
)
|
|
56
54
|
future.index = idx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from dandy import BaseIntel, Bot, Prompt
|
|
3
|
+
from dandy import BaseIntel, Bot, Prompt, recorder_to_html_file
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class MarkdownTextIntel(BaseIntel):
|
|
@@ -10,12 +10,14 @@ class MarkdownTextIntel(BaseIntel):
|
|
|
10
10
|
class MarkdownFormatLlmBot(Bot):
|
|
11
11
|
llm_intel_class = MarkdownTextIntel
|
|
12
12
|
|
|
13
|
+
@recorder_to_html_file('knowledge_markdown_improvement')
|
|
13
14
|
def process(self, markdown_content: str) -> str:
|
|
14
15
|
markdown_prompt = Prompt()
|
|
15
16
|
markdown_prompt.text(
|
|
16
17
|
'Can you improve the markdown formatting? Do NOT add or change any of the '
|
|
17
18
|
'content.'
|
|
18
19
|
)
|
|
20
|
+
markdown_prompt.line_break()
|
|
19
21
|
markdown_prompt.text(markdown_content)
|
|
20
22
|
|
|
21
23
|
result = self.llm.prompt_to_intel(prompt=markdown_prompt)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-spire
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.3
|
|
4
4
|
Summary: A project for Django Spire
|
|
5
5
|
Author-email: Brayden Carlson <braydenc@stratusadv.com>, Nathan Johnson <nathanj@stratusadv.com>
|
|
6
6
|
License: Copyright (c) 2024 Stratus Advanced Technologies and Contributors.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
django_spire/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
django_spire/conf.py,sha256=EYC1hXqYqheYrb_b6Q93LrSgNl91JV633E4N5j-KGTo,1012
|
|
3
|
-
django_spire/consts.py,sha256=
|
|
3
|
+
django_spire/consts.py,sha256=EztBlwpZEGzfLRXRk6R1W9cNJpRqGexAOyddFqIf8Cw,390
|
|
4
4
|
django_spire/exceptions.py,sha256=L5ndRO5ftMmh0pHkO2z_NG3LSGZviJ-dDHNT73SzTNw,48
|
|
5
5
|
django_spire/settings.py,sha256=tGxgEri3TQRBaiwX7YRcWifMf_g1xv1RznplFR6zZnI,821
|
|
6
6
|
django_spire/urls.py,sha256=mKeZszb5U4iIGqddMb5Tt5fRC72U2wABEOi6mvOfEBU,656
|
|
@@ -861,11 +861,11 @@ django_spire/knowledge/entry/version/block/tests/__init__.py,sha256=47DEQpj8HBSa
|
|
|
861
861
|
django_spire/knowledge/entry/version/block/tests/factories.py,sha256=rcBMAnuu1jNo8kcC4yQX5oGteP4jobJ6NagcISz5p8M,1130
|
|
862
862
|
django_spire/knowledge/entry/version/converters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
863
863
|
django_spire/knowledge/entry/version/converters/converter.py,sha256=0zbM7FTCpXe_O8gfsVc4V0Pg4cks7HMZi4SXJQ_HIEw,584
|
|
864
|
-
django_spire/knowledge/entry/version/converters/docx_converter.py,sha256=
|
|
864
|
+
django_spire/knowledge/entry/version/converters/docx_converter.py,sha256=9gevWCkZODFKCfuB__gllO6fPf5W6I90BKjuq04WwlE,2573
|
|
865
865
|
django_spire/knowledge/entry/version/converters/markdown_converter.py,sha256=uJisGt1nXg78XdA2jSCftN0fmFn9BLZuuLvBGi7c_Vg,8423
|
|
866
866
|
django_spire/knowledge/entry/version/intelligence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
867
867
|
django_spire/knowledge/entry/version/intelligence/bots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
868
|
-
django_spire/knowledge/entry/version/intelligence/bots/markdown_format_llm_bot.py,sha256=
|
|
868
|
+
django_spire/knowledge/entry/version/intelligence/bots/markdown_format_llm_bot.py,sha256=uNtaY_j2IhvDjq05mhPelItswNfzobyb89M6aOsctRE,706
|
|
869
869
|
django_spire/knowledge/entry/version/seeding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
870
870
|
django_spire/knowledge/entry/version/seeding/seeder.py,sha256=QlakhnKr-v8sM7TW2yMMUl2EZuOJOcIGS3yA6MDCcXc,2660
|
|
871
871
|
django_spire/knowledge/entry/version/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -1093,8 +1093,8 @@ django_spire/theme/urls/page_urls.py,sha256=S8nkKkgbhG3XHI3uMUL-piOjXIrRkuY2UlM_
|
|
|
1093
1093
|
django_spire/theme/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1094
1094
|
django_spire/theme/views/json_views.py,sha256=W1khC2K_EMbEzAFmMxC_P76_MFnkRH4-eVdodrRfAhw,1904
|
|
1095
1095
|
django_spire/theme/views/page_views.py,sha256=pHr8iekjtR99xs7w1taj35HEo133Svq1dvDD0y0VL1c,3933
|
|
1096
|
-
django_spire-0.18.
|
|
1097
|
-
django_spire-0.18.
|
|
1098
|
-
django_spire-0.18.
|
|
1099
|
-
django_spire-0.18.
|
|
1100
|
-
django_spire-0.18.
|
|
1096
|
+
django_spire-0.18.3.dist-info/licenses/LICENSE.md,sha256=tlTbOtgKoy-xAQpUk9gPeh9O4oRXCOzoWdW3jJz0wnA,1091
|
|
1097
|
+
django_spire-0.18.3.dist-info/METADATA,sha256=E8wol-lgXZ0pj2NVFoklpTOqRs4b9096IIKA7_6JEtQ,4974
|
|
1098
|
+
django_spire-0.18.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1099
|
+
django_spire-0.18.3.dist-info/top_level.txt,sha256=xf3QV1e--ONkVpgMDQE9iqjQ1Vg4--_6C8wmO-KxPHQ,13
|
|
1100
|
+
django_spire-0.18.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|