django-spire 0.17.2__py3-none-any.whl → 0.17.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/ai/chat/intelligence/bots/__init__.py +0 -0
- django_spire/ai/chat/intelligence/bots/chat_bot.py +8 -0
- django_spire/ai/chat/intelligence/workflows/chat_workflow.py +4 -8
- django_spire/consts.py +1 -1
- django_spire/knowledge/intelligence/bots/entry_search_llm_bot.py +5 -1
- {django_spire-0.17.2.dist-info → django_spire-0.17.3.dist-info}/METADATA +1 -1
- {django_spire-0.17.2.dist-info → django_spire-0.17.3.dist-info}/RECORD +10 -8
- {django_spire-0.17.2.dist-info → django_spire-0.17.3.dist-info}/WHEEL +0 -0
- {django_spire-0.17.2.dist-info → django_spire-0.17.3.dist-info}/licenses/LICENSE.md +0 -0
- {django_spire-0.17.2.dist-info → django_spire-0.17.3.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
from dandy import Prompt, Bot
|
|
6
6
|
from dandy.recorder import recorder_to_html_file
|
|
7
7
|
|
|
8
|
+
from django_spire.ai.chat.intelligence.bots.chat_bot import ChatBot
|
|
8
9
|
from django_spire.ai.chat.intelligence.maps.intent_llm_map import IntentDecoder
|
|
9
10
|
from django_spire.ai.chat.intelligence.prompts import organization_prompt
|
|
10
11
|
from django_spire.ai.chat.message_intel import DefaultMessageIntel
|
|
@@ -47,26 +48,21 @@ class SpireChatWorkflow:
|
|
|
47
48
|
intent_decoder = SpireChatWorkflow._generate_intent_decoder(request)
|
|
48
49
|
intents = intent_decoder.process(user_input, max_return_values=1)
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
chat_bot = ChatBot()
|
|
51
52
|
|
|
52
53
|
if intents[0] is None:
|
|
53
|
-
return
|
|
54
|
+
return chat_bot.llm.prompt_to_intel(
|
|
54
55
|
prompt=user_input,
|
|
55
56
|
intel_class=DefaultMessageIntel,
|
|
56
57
|
message_history=message_history,
|
|
57
58
|
postfix_system_prompt=organization_prompt()
|
|
58
59
|
)
|
|
59
60
|
|
|
60
|
-
return
|
|
61
|
+
return chat_bot.llm.prompt_to_intel(
|
|
61
62
|
prompt=(
|
|
62
63
|
Prompt()
|
|
63
64
|
.text(f'User Input: {user_input}')
|
|
64
65
|
.line_break()
|
|
65
|
-
.text(
|
|
66
|
-
'Use the following information to the answer the user\'s question '
|
|
67
|
-
'or concern.'
|
|
68
|
-
)
|
|
69
|
-
.line_break()
|
|
70
66
|
.text(intents[0].process(user_input))
|
|
71
67
|
),
|
|
72
68
|
intel_class=DefaultMessageIntel,
|
django_spire/consts.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from dandy import Bot, Prompt
|
|
4
|
+
from dandy.intel.intel import DefaultIntel
|
|
4
5
|
|
|
5
6
|
from django_spire.knowledge.entry.models import Entry
|
|
6
7
|
|
|
@@ -16,4 +17,7 @@ class EntrySearchLlmBot(Bot):
|
|
|
16
17
|
for version_block in entry.current_version.blocks.all():
|
|
17
18
|
entry_prompt.text(version_block.render_to_text())
|
|
18
19
|
|
|
19
|
-
return cls().llm.
|
|
20
|
+
return cls().llm.prompt_to_intel(
|
|
21
|
+
prompt=entry_prompt,
|
|
22
|
+
intel_class=DefaultIntel
|
|
23
|
+
).content
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-spire
|
|
3
|
-
Version: 0.17.
|
|
3
|
+
Version: 0.17.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=km3fdksyNcELR-UlQrrS0G1_KVwTiVaiqauBjKMlpHg,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
|
|
@@ -25,10 +25,12 @@ django_spire/ai/chat/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
25
25
|
django_spire/ai/chat/auth/controller.py,sha256=l4xHQxSlPgS_QPvofsARUOMcXzVo3cTMs2twXb9hlRk,273
|
|
26
26
|
django_spire/ai/chat/intelligence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
django_spire/ai/chat/intelligence/prompts.py,sha256=MA5jaDap4tfUVct1Yk69k3NajOsNvtV5jKhuf7RzevI,583
|
|
28
|
+
django_spire/ai/chat/intelligence/bots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
+
django_spire/ai/chat/intelligence/bots/chat_bot.py,sha256=PK7MwDLHR-Ummn0ISkA9DniPmYcwK1VHguW3MiyEwfc,182
|
|
28
30
|
django_spire/ai/chat/intelligence/maps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
31
|
django_spire/ai/chat/intelligence/maps/intent_llm_map.py,sha256=o8FRz4bq6_5tbX2AnQdfRX_kGu-4A1vlq-v8FjPPTxk,207
|
|
30
32
|
django_spire/ai/chat/intelligence/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
django_spire/ai/chat/intelligence/workflows/chat_workflow.py,sha256=
|
|
33
|
+
django_spire/ai/chat/intelligence/workflows/chat_workflow.py,sha256=W6NVF7b7MGTbwXVSF71JxjkG3LmIcvuDsKMYyfrnD34,2490
|
|
32
34
|
django_spire/ai/chat/migrations/0001_initial.py,sha256=1cbREhX3_fNsbfumJoKAZ8w91Kq5NeXUn_iI45B7oGE,2632
|
|
33
35
|
django_spire/ai/chat/migrations/0002_remove_chatmessage_content_chatmessage__content_and_more.py,sha256=KeNT7VRFmwA74odh9wxIE1Cr4KAO4Tmtqu0FuI2AmK0,752
|
|
34
36
|
django_spire/ai/chat/migrations/0003_rename__content_chatmessage__intel_data_and_more.py,sha256=wAcJ6Ia3fWrGbqnVrqD2C3-3ijAot0LK-B3KZavoY_A,754
|
|
@@ -891,7 +893,7 @@ django_spire/knowledge/entry/views/page_views.py,sha256=fsS4G58o1ZsFG2JlGgjUYhWA
|
|
|
891
893
|
django_spire/knowledge/entry/views/template_views.py,sha256=U3pqndOpPQlC2zJBKcOIM4IUXK870FH_Wpna5imIkm0,1782
|
|
892
894
|
django_spire/knowledge/intelligence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
893
895
|
django_spire/knowledge/intelligence/bots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
894
|
-
django_spire/knowledge/intelligence/bots/entry_search_llm_bot.py,sha256=
|
|
896
|
+
django_spire/knowledge/intelligence/bots/entry_search_llm_bot.py,sha256=RxYj_eFa6ZxJ1jgOZLEE4m7yiP3pxXhvzDp4SjSeX-Q,775
|
|
895
897
|
django_spire/knowledge/intelligence/intel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
896
898
|
django_spire/knowledge/intelligence/intel/collection_intel.py,sha256=2bm2t-W-zTHd6Zt5DcBPCrnSF7uK5iIZX8_KKwBfTsI,114
|
|
897
899
|
django_spire/knowledge/intelligence/intel/entry_intel.py,sha256=yxysI5Sbx5LVydnQdFa7DTObYnHl5mwe2vERSTyP8tg,338
|
|
@@ -1095,8 +1097,8 @@ django_spire/theme/urls/page_urls.py,sha256=S8nkKkgbhG3XHI3uMUL-piOjXIrRkuY2UlM_
|
|
|
1095
1097
|
django_spire/theme/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1096
1098
|
django_spire/theme/views/json_views.py,sha256=W1khC2K_EMbEzAFmMxC_P76_MFnkRH4-eVdodrRfAhw,1904
|
|
1097
1099
|
django_spire/theme/views/page_views.py,sha256=pHr8iekjtR99xs7w1taj35HEo133Svq1dvDD0y0VL1c,3933
|
|
1098
|
-
django_spire-0.17.
|
|
1099
|
-
django_spire-0.17.
|
|
1100
|
-
django_spire-0.17.
|
|
1101
|
-
django_spire-0.17.
|
|
1102
|
-
django_spire-0.17.
|
|
1100
|
+
django_spire-0.17.3.dist-info/licenses/LICENSE.md,sha256=tlTbOtgKoy-xAQpUk9gPeh9O4oRXCOzoWdW3jJz0wnA,1091
|
|
1101
|
+
django_spire-0.17.3.dist-info/METADATA,sha256=tIwxrqNEAbyJ9jbgwEB6gOHWJB4NuGF2G0IwLi3GqoQ,4936
|
|
1102
|
+
django_spire-0.17.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1103
|
+
django_spire-0.17.3.dist-info/top_level.txt,sha256=xf3QV1e--ONkVpgMDQE9iqjQ1Vg4--_6C8wmO-KxPHQ,13
|
|
1104
|
+
django_spire-0.17.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|