unique_toolkit 0.5.52__py3-none-any.whl → 0.5.53__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.
@@ -87,11 +87,10 @@ class MessageAssessment(BaseModel):
87
87
  id: str
88
88
  object: str
89
89
  message_id: str
90
- assistant_message_id: str
91
90
  status: MessageAssessmentStatus
92
- explanation: str
93
- label: MessageAssessmentLabel
94
91
  type: MessageAssessmentType
92
+ explanation: str | None = None
93
+ label: MessageAssessmentLabel | None = None
95
94
  is_visible: bool
96
- created_at: datetime
97
- updated_at: datetime
95
+ created_at: datetime | None = None
96
+ updated_at: datetime | None = None
@@ -599,9 +599,9 @@ class ChatService(BaseService):
599
599
  self,
600
600
  assistant_message_id: str,
601
601
  status: MessageAssessmentStatus,
602
- explanation: str,
603
- label: MessageAssessmentLabel,
604
602
  type: MessageAssessmentType,
603
+ explanation: str | None = None,
604
+ label: MessageAssessmentLabel | None = None,
605
605
  is_visible: bool = True,
606
606
  ) -> MessageAssessment:
607
607
  """
@@ -610,9 +610,9 @@ class ChatService(BaseService):
610
610
  Args:
611
611
  assistant_message_id (str): The ID of the assistant message to assess
612
612
  status (MessageAssessmentStatus): The status of the assessment (e.g. "DONE")
613
- explanation (str): Explanation of the assessment
614
- label (MessageAssessmentLabel): The assessment label (e.g. "NEGATIVE")
615
613
  type (MessageAssessmentType): The type of assessment (e.g. "HALLUCINATION")
614
+ explanation (str | None): Explanation of the assessment
615
+ label (MessageAssessmentLabel | None): The assessment label (e.g. "NEGATIVE")
616
616
  is_visible (bool): Whether the assessment is visible to users. Defaults to True.
617
617
 
618
618
  Returns:
@@ -625,11 +625,11 @@ class ChatService(BaseService):
625
625
  assessment = unique_sdk.MessageAssessment.create(
626
626
  user_id=self.event.user_id,
627
627
  company_id=self.event.company_id,
628
- assistant_message_id=assistant_message_id,
628
+ messageId=assistant_message_id,
629
629
  status=status.name,
630
630
  explanation=explanation,
631
- label=label.name,
632
- type=type.name,
631
+ label=label.name if label else None,
632
+ type=type.name if type else None,
633
633
  isVisible=is_visible,
634
634
  )
635
635
  return MessageAssessment(**assessment)
@@ -641,9 +641,9 @@ class ChatService(BaseService):
641
641
  self,
642
642
  assistant_message_id: str,
643
643
  status: MessageAssessmentStatus,
644
- explanation: str,
645
- label: MessageAssessmentLabel,
646
644
  type: MessageAssessmentType,
645
+ explanation: str | None = None,
646
+ label: MessageAssessmentLabel | None = None,
647
647
  is_visible: bool = True,
648
648
  ) -> MessageAssessment:
649
649
  """
@@ -652,9 +652,9 @@ class ChatService(BaseService):
652
652
  Args:
653
653
  assistant_message_id (str): The ID of the assistant message to assess
654
654
  status (MessageAssessmentStatus): The status of the assessment (e.g. "DONE")
655
- explanation (str): Explanation of the assessment
656
- label (MessageAssessmentLabel): The assessment label (e.g. "NEGATIVE")
657
655
  type (MessageAssessmentType): The type of assessment (e.g. "HALLUCINATION")
656
+ explanation (str | None): Explanation of the assessment
657
+ label (MessageAssessmentLabel | None): The assessment label (e.g. "NEGATIVE")
658
658
  is_visible (bool): Whether the assessment is visible to users. Defaults to True.
659
659
 
660
660
  Returns:
@@ -667,11 +667,11 @@ class ChatService(BaseService):
667
667
  assessment = await unique_sdk.MessageAssessment.create_async(
668
668
  user_id=self.event.user_id,
669
669
  company_id=self.event.company_id,
670
- assistant_message_id=assistant_message_id,
670
+ messageId=assistant_message_id,
671
671
  status=status.name,
672
672
  explanation=explanation,
673
- label=label.name,
674
- type=type.name,
673
+ label=label.name if label else None,
674
+ type=type.name if type else None,
675
675
  isVisible=is_visible,
676
676
  )
677
677
  return MessageAssessment(**assessment)
@@ -683,9 +683,9 @@ class ChatService(BaseService):
683
683
  self,
684
684
  assistant_message_id: str,
685
685
  status: MessageAssessmentStatus,
686
- explanation: str,
687
- label: MessageAssessmentLabel,
688
686
  type: MessageAssessmentType,
687
+ explanation: str | None = None,
688
+ label: MessageAssessmentLabel | None = None,
689
689
  ) -> MessageAssessment:
690
690
  """
691
691
  Modifies a message assessment for an assistant message synchronously.
@@ -693,8 +693,8 @@ class ChatService(BaseService):
693
693
  Args:
694
694
  assistant_message_id (str): The ID of the assistant message to assess
695
695
  status (MessageAssessmentStatus): The status of the assessment (e.g. "DONE")
696
- explanation (str): Explanation of the assessment
697
- label (MessageAssessmentLabel): The assessment label (e.g. "NEGATIVE")
696
+ explanation (str | None): Explanation of the assessment
697
+ label (MessageAssessmentLabel | None): The assessment label (e.g. "NEGATIVE")
698
698
  type (MessageAssessmentType): The type of assessment (e.g. "HALLUCINATION")
699
699
 
700
700
  Returns:
@@ -707,10 +707,10 @@ class ChatService(BaseService):
707
707
  assessment = unique_sdk.MessageAssessment.modify(
708
708
  user_id=self.event.user_id,
709
709
  company_id=self.event.company_id,
710
- assistant_message_id=assistant_message_id,
710
+ messageId=assistant_message_id,
711
711
  status=status.name,
712
712
  explanation=explanation,
713
- label=label.name,
713
+ label=label.name if label else None,
714
714
  type=type.name,
715
715
  )
716
716
  return MessageAssessment(**assessment)
@@ -721,10 +721,10 @@ class ChatService(BaseService):
721
721
  async def modify_message_assessment_async(
722
722
  self,
723
723
  assistant_message_id: str,
724
- status: MessageAssessmentStatus,
725
- explanation: str,
726
- label: MessageAssessmentLabel,
727
724
  type: MessageAssessmentType,
725
+ status: MessageAssessmentStatus | None = None,
726
+ explanation: str | None = None,
727
+ label: MessageAssessmentLabel | None = None,
728
728
  ) -> MessageAssessment:
729
729
  """
730
730
  Modifies a message assessment for an assistant message asynchronously.
@@ -732,8 +732,8 @@ class ChatService(BaseService):
732
732
  Args:
733
733
  assistant_message_id (str): The ID of the assistant message to assess
734
734
  status (MessageAssessmentStatus): The status of the assessment (e.g. "DONE")
735
- explanation (str): Explanation of the assessment
736
- label (MessageAssessmentLabel): The assessment label (e.g. "NEGATIVE")
735
+ explanation (str | None): Explanation of the assessment
736
+ label (MessageAssessmentLabel | None): The assessment label (e.g. "NEGATIVE")
737
737
  type (MessageAssessmentType): The type of assessment (e.g. "HALLUCINATION")
738
738
 
739
739
  Returns:
@@ -746,10 +746,10 @@ class ChatService(BaseService):
746
746
  assessment = await unique_sdk.MessageAssessment.modify_async(
747
747
  user_id=self.event.user_id,
748
748
  company_id=self.event.company_id,
749
- assistant_message_id=assistant_message_id,
750
- status=status.name,
749
+ messageId=assistant_message_id,
750
+ status=status.name if status else None,
751
751
  explanation=explanation,
752
- label=label.name,
752
+ label=label.name if label else None,
753
753
  type=type.name,
754
754
  )
755
755
  return MessageAssessment(**assessment)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.5.52
3
+ Version: 0.5.53
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Martin Fadler
@@ -100,6 +100,9 @@ All notable changes to this project will be documented in this file.
100
100
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
101
101
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
102
102
 
103
+ ## [0.5.53] - 2025-02-01
104
+ - Correct `MessageAssessment` schemas
105
+
103
106
  ## [0.5.52] - 2025-02-01
104
107
  - Add `MessageAssessment` schemas and functions to `ChatService` to handle message assessments.
105
108
  - Fix `LanguageModelService.complete_async_util` to use the correct async method.
@@ -11,8 +11,8 @@ unique_toolkit/app/performance/async_wrapper.py,sha256=yVVcRDkcdyfjsxro-N29SBvi-
11
11
  unique_toolkit/app/schemas.py,sha256=6RY7Ex-B3pOnFILlitHEi9sqJvupbpdxlN9xt33qRsM,1571
12
12
  unique_toolkit/app/verification.py,sha256=mffa6wm0i4hJbwzofePrkaia46xumMzECwQ0T3eKAx0,1929
13
13
  unique_toolkit/chat/__init__.py,sha256=4xS-Mcv7Oqdhprw1JEqD3nwGFflla4R2o7RNJyA5Wek,537
14
- unique_toolkit/chat/schemas.py,sha256=pWEOkLgZn4LUriFAQeKFHDAqUe1vjl20LPsoM1tdIic,2227
15
- unique_toolkit/chat/service.py,sha256=AQ61nrUBLTomBCzSmyzZ9257pRH666zKNDrtQHoPkrE,27851
14
+ unique_toolkit/chat/schemas.py,sha256=LOGO-yyQZ6ifb4lDEOSIQl_6-di8KXEB7AKtkjA3xSU,2253
15
+ unique_toolkit/chat/service.py,sha256=9sQbfwgb2GoUuDL3xoG-7P9oOEj-TAssZleXwSZ3HiY,28121
16
16
  unique_toolkit/chat/state.py,sha256=Cjgwv_2vhDFbV69xxsn7SefhaoIAEqLx3ferdVFCnOg,1445
17
17
  unique_toolkit/chat/utils.py,sha256=ihm-wQykBWhB4liR3LnwPVPt_qGW6ETq21Mw4HY0THE,854
18
18
  unique_toolkit/content/__init__.py,sha256=MSH2sxjQyKD2Sef92fzE5Dt9SihdzivB6yliSwJfTmQ,890
@@ -44,7 +44,7 @@ unique_toolkit/language_model/service.py,sha256=m4B4YD4wxfU8HNo_stqbfnlKXziYBAwq
44
44
  unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0tAFc3VCRc,1902
45
45
  unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJs8FEZXcgQTNenw,1406
46
46
  unique_toolkit/short_term_memory/service.py,sha256=Jd9P72-VvJy7hnqNrjmrmB5BHmsKuOpTiT0Jr-dBbsQ,1682
47
- unique_toolkit-0.5.52.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
48
- unique_toolkit-0.5.52.dist-info/METADATA,sha256=M7kVSW4aRX-04EGrhWt136ICM75ok4vFPkjBJyvkbZc,16293
49
- unique_toolkit-0.5.52.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
50
- unique_toolkit-0.5.52.dist-info/RECORD,,
47
+ unique_toolkit-0.5.53.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
48
+ unique_toolkit-0.5.53.dist-info/METADATA,sha256=BUtdCWRnnsrlHOl6XJtWxvXrZbhNPPR00g4R09QGHpI,16357
49
+ unique_toolkit-0.5.53.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
50
+ unique_toolkit-0.5.53.dist-info/RECORD,,