django-spire 0.19.1__py3-none-any.whl → 0.19.2__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.
@@ -63,6 +63,13 @@ def chat_workflow(
63
63
  message_intel = run_workflow_process(intent_process)
64
64
 
65
65
  if not isinstance(message_intel, BaseMessageIntel):
66
+ if message_intel is None:
67
+ return default_chat_response(
68
+ request=request,
69
+ user_input=user_input,
70
+ message_history=message_history
71
+ )
72
+
66
73
  message = f'{intent_process.__qualname__} must return an instance of a {BaseMessageIntel.__name__} sub class.'
67
74
  raise TypeError(message)
68
75
 
@@ -67,7 +67,7 @@
67
67
  )
68
68
 
69
69
  if (was_new_chat) {
70
- this.chat_name = message_body
70
+ this.chat_name = message_body.length > 24 ? message_body.substring(0, 21) + '...' : message_body
71
71
 
72
72
  let message_element = this.$refs.target_div.querySelector('[data-message-chat-id]')
73
73
 
django_spire/consts.py CHANGED
@@ -1,4 +1,4 @@
1
- __VERSION__ = '0.19.1'
1
+ __VERSION__ = '0.19.2'
2
2
 
3
3
  MAINTENANCE_MODE_SETTINGS_NAME = 'MAINTENANCE_MODE'
4
4
 
@@ -1,12 +1,11 @@
1
- from typing import List, Type, TypeVar, Any
1
+ from typing import Any
2
2
 
3
3
  from django.contrib.contenttypes.models import ContentType
4
- from django.db import models
5
4
 
6
5
  from django_spire.file.models import File
7
6
 
8
7
 
9
- def copy_files_from_source_to_target_model_object(source: Any[models.Model], target: Any[models.Model]) -> List[File]:
8
+ def copy_files_from_source_to_target_model_object(source: Any, target: Any) -> list[File]:
10
9
  target_class = target.__class__
11
10
  target_content_type = ContentType.objects.get_for_model(target_class)
12
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-spire
3
- Version: 0.19.1
3
+ Version: 0.19.2
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=c5Hs-7lk9T15254tOasiQ2ZTFLQIVJof9_QJDfm1PAI,933
3
- django_spire/consts.py,sha256=GqwKKYevR0Ew6grst8Ii6x4u_9Cds318I-LxabTpU9I,171
3
+ django_spire/consts.py,sha256=td9WULXrXlsZZ25GH8r89OgmOqcJengOtiy2pDusQa0,171
4
4
  django_spire/exceptions.py,sha256=L5ndRO5ftMmh0pHkO2z_NG3LSGZviJ-dDHNT73SzTNw,48
5
5
  django_spire/settings.py,sha256=_bM5uUqJXq3sW-NZBNAzt4egZwmvLq_jA8DaQGHqVoE,661
6
6
  django_spire/urls.py,sha256=mKeZszb5U4iIGqddMb5Tt5fRC72U2wABEOi6mvOfEBU,656
@@ -27,7 +27,7 @@ django_spire/ai/chat/intelligence/prompts.py,sha256=jnFaN7EUUQM-wxloWJZ2UAGw1RDX
27
27
  django_spire/ai/chat/intelligence/decoders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  django_spire/ai/chat/intelligence/decoders/tools.py,sha256=8fSnuWL1Apr32-hH52Fz9UUAA0Ph54EYUgohAXnwGIM,933
29
29
  django_spire/ai/chat/intelligence/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- django_spire/ai/chat/intelligence/workflows/chat_workflow.py,sha256=-OEOAQzeOAEIZam7ru4IAOjcSiZvWk_G9fpYdDlSc58,2078
30
+ django_spire/ai/chat/intelligence/workflows/chat_workflow.py,sha256=a5rMWbSEBHFe_EAiWpiow0WanAdibLdywtJfrL0oBX8,2289
31
31
  django_spire/ai/chat/migrations/0001_initial.py,sha256=1cbREhX3_fNsbfumJoKAZ8w91Kq5NeXUn_iI45B7oGE,2632
32
32
  django_spire/ai/chat/migrations/0002_remove_chatmessage_content_chatmessage__content_and_more.py,sha256=KeNT7VRFmwA74odh9wxIE1Cr4KAO4Tmtqu0FuI2AmK0,752
33
33
  django_spire/ai/chat/migrations/0003_rename__content_chatmessage__intel_data_and_more.py,sha256=wAcJ6Ia3fWrGbqnVrqD2C3-3ijAot0LK-B3KZavoY_A,754
@@ -43,7 +43,7 @@ django_spire/ai/chat/templates/django_spire/ai/chat/message/request_message.html
43
43
  django_spire/ai/chat/templates/django_spire/ai/chat/message/response_message.html,sha256=NZDDVY1nYxvyplQobO3gW6i-sevPZd8pXSIsNacF9Yw,525
44
44
  django_spire/ai/chat/templates/django_spire/ai/chat/page/chat_page.html,sha256=atgCFgXIAIVKnD6oEFzIF7MiUFTrS7GwN8klKRdB7LE,957
45
45
  django_spire/ai/chat/templates/django_spire/ai/chat/section/confirm_delete_section.html,sha256=yJr-zmu4CV7REGnHa2uA_MqgqiftSz-r2bb7U0_5CIY,720
46
- django_spire/ai/chat/templates/django_spire/ai/chat/widget/dialog_widget.html,sha256=tSUbcdmotVJxU4DqmgLkqlFOVoJpxbMPy0BruPeU6yc,5239
46
+ django_spire/ai/chat/templates/django_spire/ai/chat/widget/dialog_widget.html,sha256=-TwiNUfwh81JHjSLPmE-WLM8FR0FxPM9jeL0IZwztlI,5306
47
47
  django_spire/ai/chat/templates/django_spire/ai/chat/widget/recent_chat_list_widget.html,sha256=pbn8yyVL2i0ugyS84cmNX-nrr1K-oOAQiHnsjlQ_wYc,132
48
48
  django_spire/ai/chat/templates/django_spire/ai/chat/widget/selection_widget.html,sha256=Fa5Ja2i7J4rL5hU53b90RKPjFFyDpGujqOp5LpnyfCU,1617
49
49
  django_spire/ai/chat/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -699,7 +699,7 @@ django_spire/file/interfaces.py,sha256=i4T3-d8f-5Dfi4-exWAofNNZui9FXbyizQ0OQsbcX
699
699
  django_spire/file/mixins.py,sha256=jSRljAO61EEVs74L0Ap74zfnE6Ful4Gsw7pe4wu7HGU,618
700
700
  django_spire/file/models.py,sha256=FZCuThGV6cjKRvXWaDfxwzZTopVvGw51eEarcLHmiJ8,1506
701
701
  django_spire/file/queryset.py,sha256=RNIVCFd-Z0sQCz2UfHfvR-fYOhoztVduf9WO-NlhiKM,289
702
- django_spire/file/tools.py,sha256=CIf9eH3CYHk-QZAgTcjYBvx3xVhBP-goFCJbkEwIEEA,1014
702
+ django_spire/file/tools.py,sha256=QHKk0YNNDxks2VtkqmM0UKf3LXcrhIlUUZuNnWCNZ74,936
703
703
  django_spire/file/urls.py,sha256=BadfH7ba7X4PDCmGhUEVqY3FFBfqaTqqOF1eNJxfR8A,364
704
704
  django_spire/file/utils.py,sha256=gI8aVCw9-a4TJs3dRx2Ld5btlW1zcP5Ut22Rqpn7Aj0,157
705
705
  django_spire/file/views.py,sha256=RwJ9zolskQA3SAq55kG4ov4YKJgbnzgpvTB3lwBLfKQ,1045
@@ -1132,8 +1132,8 @@ django_spire/theme/urls/page_urls.py,sha256=S8nkKkgbhG3XHI3uMUL-piOjXIrRkuY2UlM_
1132
1132
  django_spire/theme/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1133
1133
  django_spire/theme/views/json_views.py,sha256=W1khC2K_EMbEzAFmMxC_P76_MFnkRH4-eVdodrRfAhw,1904
1134
1134
  django_spire/theme/views/page_views.py,sha256=pHr8iekjtR99xs7w1taj35HEo133Svq1dvDD0y0VL1c,3933
1135
- django_spire-0.19.1.dist-info/licenses/LICENSE.md,sha256=tlTbOtgKoy-xAQpUk9gPeh9O4oRXCOzoWdW3jJz0wnA,1091
1136
- django_spire-0.19.1.dist-info/METADATA,sha256=U5ZUHeqx7phdgXI0WZv-aTRSdGz8LqP0-XmsGHAgZBY,4967
1137
- django_spire-0.19.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1138
- django_spire-0.19.1.dist-info/top_level.txt,sha256=xf3QV1e--ONkVpgMDQE9iqjQ1Vg4--_6C8wmO-KxPHQ,13
1139
- django_spire-0.19.1.dist-info/RECORD,,
1135
+ django_spire-0.19.2.dist-info/licenses/LICENSE.md,sha256=tlTbOtgKoy-xAQpUk9gPeh9O4oRXCOzoWdW3jJz0wnA,1091
1136
+ django_spire-0.19.2.dist-info/METADATA,sha256=hMrAbPJ-W-CZD5ivMnoiohOfV8PgDl14OMVyjdJnqKI,4967
1137
+ django_spire-0.19.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1138
+ django_spire-0.19.2.dist-info/top_level.txt,sha256=xf3QV1e--ONkVpgMDQE9iqjQ1Vg4--_6C8wmO-KxPHQ,13
1139
+ django_spire-0.19.2.dist-info/RECORD,,