unique_toolkit 2026.44.0.dev7__py3-none-any.whl → 2026.44.0.dev8__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.
@@ -555,12 +555,22 @@ def list_messages(
555
555
  event_user_id: str,
556
556
  event_company_id: str,
557
557
  chat_id: str,
558
+ exclude_gpt_request: bool = False,
558
559
  ) -> ListObject[unique_sdk.Message]:
560
+ """List the messages of a chat.
561
+
562
+ Set `exclude_gpt_request` to skip loading each message's stored LLM request
563
+ (returned as `None`); it holds the full prompt history and can reach
564
+ hundreds of MB for long chats. Platforms without support ignore it.
565
+ """
559
566
  try:
567
+ params: unique_sdk.Message.ListParams = {"chatId": chat_id}
568
+ if exclude_gpt_request:
569
+ params["excludeGptRequest"] = True
560
570
  messages = unique_sdk.Message.list(
561
571
  user_id=event_user_id,
562
572
  company_id=event_company_id,
563
- chatId=chat_id,
573
+ **params,
564
574
  )
565
575
  return messages
566
576
  except Exception as e:
@@ -572,12 +582,17 @@ async def list_messages_async(
572
582
  event_user_id: str,
573
583
  event_company_id: str,
574
584
  chat_id: str,
585
+ exclude_gpt_request: bool = False,
575
586
  ) -> ListObject[unique_sdk.Message]:
587
+ """Async variant of `list_messages`."""
576
588
  try:
589
+ params: unique_sdk.Message.ListParams = {"chatId": chat_id}
590
+ if exclude_gpt_request:
591
+ params["excludeGptRequest"] = True
577
592
  messages = await unique_sdk.Message.list_async(
578
593
  user_id=event_user_id,
579
594
  company_id=event_company_id,
580
- chatId=chat_id,
595
+ **params,
581
596
  )
582
597
  return messages
583
598
  except Exception as e:
@@ -590,7 +605,12 @@ def get_full_history(
590
605
  event_company_id: str,
591
606
  event_payload_chat_id: str,
592
607
  ) -> list[ChatMessage]:
593
- messages = list_messages(event_user_id, event_company_id, event_payload_chat_id)
608
+ messages = list_messages(
609
+ event_user_id,
610
+ event_company_id,
611
+ event_payload_chat_id,
612
+ exclude_gpt_request=True,
613
+ )
594
614
  messages = filter_valid_messages(messages)
595
615
 
596
616
  return [ChatMessage.model_validate(msg) for msg in messages]
@@ -605,6 +625,7 @@ async def get_full_history_async(
605
625
  event_user_id,
606
626
  event_company_id,
607
627
  event_payload_chat_id,
628
+ exclude_gpt_request=True,
608
629
  )
609
630
  messages = filter_valid_messages(messages)
610
631
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: unique-toolkit
3
- Version: 2026.44.0.dev7
3
+ Version: 2026.44.0.dev8
4
4
  Summary:
5
5
  Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
6
6
  Author-email: Cedric Klinkert <cedric.klinkert@unique.ch>, Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>, Ejiroghene Oki-Peter <oki-peter.ejiroghene@unique.ai>, Rami Azouz <rami.ext@unique.ch>, Ricardo Visini <ricardo.visini@unique.ch>, Sanzio Monti <sanzio.monti@unique.ai>
@@ -16,7 +16,7 @@ Requires-Dist: sseclient>=0.0.27,<0.0.28
16
16
  Requires-Dist: openai>=1.105.0,<3
17
17
  Requires-Dist: platformdirs>=4.0.0,<5
18
18
  Requires-Dist: pillow>=12.1.1
19
- Requires-Dist: unique-sdk>=2026.44.0.dev9,<2026.44.0rc0
19
+ Requires-Dist: unique-sdk>=2026.44.0.dev11,<2026.44.0rc0
20
20
  Requires-Dist: jambo>=0.1.2,<0.2
21
21
  Requires-Dist: jinja2>=3.1.6,<4
22
22
  Requires-Dist: docxtpl>=0.20.1,<0.21
@@ -264,7 +264,7 @@ unique_toolkit/chat/cancellation.py,sha256=k5HMjpeBmofIiInwq5TjOR_5k91oq1bWG00lJ
264
264
  unique_toolkit/chat/constants.py,sha256=05kq6zjqUVB2d6_P7s-90nbljpB3ryxwCI-CAz0r2O4,83
265
265
  unique_toolkit/chat/deprecated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
266
266
  unique_toolkit/chat/deprecated/service.py,sha256=8_XoopUWHT396Z_5gwMmsI6v4NGVgQirSJCYUW4Gx8c,9339
267
- unique_toolkit/chat/functions.py,sha256=fb4x_y4d5QwT1WUjVEP-opFpJ9CV8WaiLAOR1ktTmy0,57073
267
+ unique_toolkit/chat/functions.py,sha256=-XNlQHO4UAdDwwnZUXFUAlV-lKh-7oqyJO6ZKyr_4Jc,57846
268
268
  unique_toolkit/chat/rendering.py,sha256=c8YiV9oADRrJQ5A_QBJ4_UFc0NZ-2vVaa7tupoMusso,880
269
269
  unique_toolkit/chat/responses_api.py,sha256=Swp6wi10vCPkBiSSj8NN58gpjTgYVkqRlwdOJRQHVjo,21135
270
270
  unique_toolkit/chat/schemas.py,sha256=tRU8vcT1SQWtktkHQmDO26CNbOgSynFHfFB9FR6D4OQ,8372
@@ -428,6 +428,6 @@ unique_toolkit/short_term_memory/service.py,sha256=2JMBEBn6GoyK-a0xvdcWpPft-3C74
428
428
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
429
429
  unique_toolkit/smart_rules/compile.py,sha256=vRe0aMJWuVIK-VsqomgxQImzke7MDmwgSxxJfYCa7zw,1386
430
430
  unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
431
- unique_toolkit-2026.44.0.dev7.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
432
- unique_toolkit-2026.44.0.dev7.dist-info/METADATA,sha256=7-kXD4_OtkdLGy-5fxeaVO1fVsjKDJzwt_-T1iGWHK8,7821
433
- unique_toolkit-2026.44.0.dev7.dist-info/RECORD,,
431
+ unique_toolkit-2026.44.0.dev8.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
432
+ unique_toolkit-2026.44.0.dev8.dist-info/METADATA,sha256=eosHGiKKZLfdMY-RLddrhW6WJM7oYQ6MCYwSv1bHF2E,7822
433
+ unique_toolkit-2026.44.0.dev8.dist-info/RECORD,,