unique_toolkit 0.7.20__py3-none-any.whl → 0.7.22__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.
@@ -37,6 +37,15 @@ class ToolCall(BaseModel):
37
37
  function: Function
38
38
 
39
39
 
40
+ class Reference(BaseModel):
41
+ model_config = model_config
42
+ name: str
43
+ url: str | None = None
44
+ sequence_number: int
45
+ source_id: str
46
+ source: str
47
+
48
+
40
49
  class ChatMessage(BaseModel):
41
50
  # This model should strictly meets https://github.com/Unique-AG/monorepo/blob/master/node/apps/node-chat/src/public-api/2023-12-06/dtos/message/public-message.dto.ts
42
51
  model_config = model_config
@@ -54,6 +63,7 @@ class ChatMessage(BaseModel):
54
63
  created_at: datetime | None = None
55
64
  completed_at: datetime | None = None
56
65
  updated_at: datetime | None = None
66
+ references: list[Reference] | None = None
57
67
 
58
68
  # TODO make sdk return role consistently in lowercase
59
69
  # Currently needed as sdk returns role in uppercase
@@ -222,10 +222,9 @@ def _prepare_completion_params_util(
222
222
  model_name.value if isinstance(model_name, LanguageModelName) else model_name
223
223
  )
224
224
 
225
- # Different methods need different message dump parameters
226
225
  messages_dict = messages.model_dump(
227
226
  exclude_none=True,
228
- by_alias=content_chunks is not None, # Use by_alias for streaming methods
227
+ by_alias=True,
229
228
  )
230
229
 
231
230
  search_context = (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.7.20
3
+ Version: 0.7.22
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Martin Fadler
@@ -111,6 +111,11 @@ All notable changes to this project will be documented in this file.
111
111
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
112
112
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
113
113
 
114
+ ## [0.7.22] - 2025-05-22
115
+ - `messages` are now always serialized by alias. This affects `LanguageModelService.complete` and `LanguageModelService.complete_async`.
116
+
117
+ ## [0.7.21] - 2025-05-21
118
+ - Extend the update the `ChatMessage` object to include the `Reference` object introduced in the public api
114
119
 
115
120
  ## [0.7.20] - 2025-05-21
116
121
  - Deprecate `LanguageModelTool` and associated models in favor of `LanguageModelToolDescription`
@@ -14,7 +14,7 @@ unique_toolkit/app/verification.py,sha256=GxFFwcJMy25fCA_Xe89wKW7bgqOu8PAs5y8QpH
14
14
  unique_toolkit/chat/__init__.py,sha256=LRs2G-JTVuci4lbtHTkVUiNcZcSR6uqqfnAyo7af6nY,619
15
15
  unique_toolkit/chat/constants.py,sha256=05kq6zjqUVB2d6_P7s-90nbljpB3ryxwCI-CAz0r2O4,83
16
16
  unique_toolkit/chat/functions.py,sha256=TP55fSVXWTO3OoGUuYBuK9cBHUw96wlQGbVfhhMalCI,27332
17
- unique_toolkit/chat/schemas.py,sha256=MNcGAXjK1K8zOODeMFz3FHVQL5sIBQXRwkr_2hFkG8k,2672
17
+ unique_toolkit/chat/schemas.py,sha256=ct3BbvdQmpcNeDmJdc-Iz33LX1_3O-SGVgrsuT0B99k,2881
18
18
  unique_toolkit/chat/service.py,sha256=K7XtB3IdKznNu1r4dy2dXiwZYQg_vKgRUD52RoKewQU,40799
19
19
  unique_toolkit/chat/state.py,sha256=Cjgwv_2vhDFbV69xxsn7SefhaoIAEqLx3ferdVFCnOg,1445
20
20
  unique_toolkit/chat/utils.py,sha256=ihm-wQykBWhB4liR3LnwPVPt_qGW6ETq21Mw4HY0THE,854
@@ -47,7 +47,7 @@ unique_toolkit/evaluators/schemas.py,sha256=Jaue6Uhx75X1CyHKWj8sT3RE1JZXTqoLtfLt
47
47
  unique_toolkit/language_model/__init__.py,sha256=lRQyLlbwHbNFf4-0foBU13UGb09lwEeodbVsfsSgaCk,1971
48
48
  unique_toolkit/language_model/builder.py,sha256=69WCcmkm2rMP2-YEH_EjHiEp6OzwjwCs8VbhjVJaCe0,3168
49
49
  unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
50
- unique_toolkit/language_model/functions.py,sha256=KbCClXmRnrs-Ug8Wi9ehCLTqT2aIr3PQFc1rBuV3Om0,8172
50
+ unique_toolkit/language_model/functions.py,sha256=koCAfhtkIGSiy8pSdDpIw9xRbwJ20EeLhDQMUXc8KZk,8049
51
51
  unique_toolkit/language_model/infos.py,sha256=qPf4Xlanet8jf0apZ6-qxS_6zmDd6p9D40it2TqmF3w,25910
52
52
  unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
53
53
  unique_toolkit/language_model/schemas.py,sha256=DJD2aoMfs2Irnc4rzOrVuV4Fbt84LQAiDGG5rse1dgk,12770
@@ -59,7 +59,7 @@ unique_toolkit/short_term_memory/constants.py,sha256=698CL6-wjup2MvU19RxSmQk3gX7
59
59
  unique_toolkit/short_term_memory/functions.py,sha256=3WiK-xatY5nh4Dr5zlDUye1k3E6kr41RiscwtTplw5k,4484
60
60
  unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJs8FEZXcgQTNenw,1406
61
61
  unique_toolkit/short_term_memory/service.py,sha256=vEKFxP1SScPrFniso492fVthWR1sosdFibhiNF3zRvI,8081
62
- unique_toolkit-0.7.20.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
63
- unique_toolkit-0.7.20.dist-info/METADATA,sha256=xu8iiH5H160McoUAkZB14EkYWfNqZ7uDhwzu_QmrCu8,22908
64
- unique_toolkit-0.7.20.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
65
- unique_toolkit-0.7.20.dist-info/RECORD,,
62
+ unique_toolkit-0.7.22.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
63
+ unique_toolkit-0.7.22.dist-info/METADATA,sha256=jKHW5BsfQp3HoOAboEX857b_bbEtrRYsA1IqOxb8hQw,23204
64
+ unique_toolkit-0.7.22.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
65
+ unique_toolkit-0.7.22.dist-info/RECORD,,