unique_toolkit 0.8.55__py3-none-any.whl → 0.8.56__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.
@@ -170,7 +170,7 @@ class HistoryManager:
170
170
  ) # it can be that the tool response does not have content chunks
171
171
 
172
172
  # Transform content chunks into sources to be appended to tool result
173
- sources = transform_chunks_to_string(
173
+ stringified_sources, sources = transform_chunks_to_string(
174
174
  content_chunks,
175
175
  self._source_enumerator,
176
176
  None, # Use None for SourceFormatConfig
@@ -183,7 +183,7 @@ class HistoryManager:
183
183
 
184
184
  # Append the result to the history
185
185
  return LanguageModelToolMessage(
186
- content=sources,
186
+ content=stringified_sources,
187
187
  tool_call_id=tool_response.id, # type: ignore
188
188
  name=tool_response.name,
189
189
  )
@@ -64,7 +64,7 @@ def transform_chunks_to_string(
64
64
  max_source_number: int,
65
65
  cfg: SourceFormatConfig | None,
66
66
  full_sources_serialize_dump: bool = False,
67
- ) -> str:
67
+ ) -> tuple[str, list[Source]]:
68
68
  """Transform content chunks into a string of sources.
69
69
 
70
70
  Args:
@@ -76,7 +76,7 @@ def transform_chunks_to_string(
76
76
  str: String for the tool call response
77
77
  """
78
78
  if not content_chunks:
79
- return "No relevant sources found."
79
+ return "No relevant sources found.", []
80
80
  if full_sources_serialize_dump:
81
81
  sources = [
82
82
  Source(
@@ -114,7 +114,7 @@ def transform_chunks_to_string(
114
114
  }
115
115
  for i, chunk in enumerate(content_chunks)
116
116
  ]
117
- return json.dumps(sources)
117
+ return json.dumps(sources), sources
118
118
 
119
119
 
120
120
  def load_sources_from_string(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.8.55
3
+ Version: 0.8.56
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -119,6 +119,9 @@ All notable changes to this project will be documented in this file.
119
119
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
120
120
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
121
121
 
122
+ ## [0.8.56] - 2025-09-12
123
+ - Fixed token counter in utils
124
+
122
125
  ## [0.8.55] - 2025-09-10
123
126
  - Update documentation with agentic managers
124
127
 
@@ -70,9 +70,9 @@ unique_toolkit/framework_utilities/openai/client.py,sha256=ct1cqPcIK1wPl11G9sJV3
70
70
  unique_toolkit/framework_utilities/openai/message_builder.py,sha256=VU6mJm_upLcarJQKFft_t1RlLRncWDxDuLC5LIJ5lQQ,4339
71
71
  unique_toolkit/framework_utilities/utils.py,sha256=JK7g2yMfEx3eMprug26769xqNpS5WJcizf8n2zWMBng,789
72
72
  unique_toolkit/history_manager/history_construction_with_contents.py,sha256=c8Zy3erSbHGT8AdICRRlSK91T_FN6tNpTznvUzpLbWk,9023
73
- unique_toolkit/history_manager/history_manager.py,sha256=7mdT8li4Oo-t0d1q0pCwJksdal-Y0wLzZj-YnIlJ6xQ,8350
73
+ unique_toolkit/history_manager/history_manager.py,sha256=GVz6G_Ys_3_v7N4Ts4jNh7H1fYI8lKOlkyJfuBdhX04,8383
74
74
  unique_toolkit/history_manager/loop_token_reducer.py,sha256=PJlC2PQnKPMkyazN_wBsCjO3Bl0I-HJoJ_YRUCeolv0,18458
75
- unique_toolkit/history_manager/utils.py,sha256=iu4LsYOElx8HlZjcx3ZC75I-TmEYBiEP9q2J93Q63Mg,5606
75
+ unique_toolkit/history_manager/utils.py,sha256=pzIt8npHA3vhOe-wIBiiMPaKk6hQSjMRhkK0pkxwF1k,5640
76
76
  unique_toolkit/language_model/__init__.py,sha256=lRQyLlbwHbNFf4-0foBU13UGb09lwEeodbVsfsSgaCk,1971
77
77
  unique_toolkit/language_model/builder.py,sha256=4OKfwJfj3TrgO1ezc_ewIue6W7BCQ2ZYQXUckWVPPTA,3369
78
78
  unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
@@ -122,7 +122,7 @@ unique_toolkit/tools/utils/source_handling/__init__.py,sha256=47DEQpj8HBSa-_TImW
122
122
  unique_toolkit/tools/utils/source_handling/schema.py,sha256=vzAyf6ZWNexjMO0OrnB8y2glGkvAilmGGQXd6zcDaKw,870
123
123
  unique_toolkit/tools/utils/source_handling/source_formatting.py,sha256=C7uayNbdkNVJdEARA5CENnHtNY1SU6etlaqbgHNyxaQ,9152
124
124
  unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py,sha256=oM5ZxEgzROrnX1229KViCAFjRxl9wCTzWZoinYSHleM,6979
125
- unique_toolkit-0.8.55.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
126
- unique_toolkit-0.8.55.dist-info/METADATA,sha256=LrzX30duYYB7UEjhgr6jvBPNGjFAHG_DZohL7X1N1lI,31820
127
- unique_toolkit-0.8.55.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
128
- unique_toolkit-0.8.55.dist-info/RECORD,,
125
+ unique_toolkit-0.8.56.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
126
+ unique_toolkit-0.8.56.dist-info/METADATA,sha256=nIXU9x2RXNQMyTHGhcb3awPM-H4Gq6eZdEOLexZRito,31877
127
+ unique_toolkit-0.8.56.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
128
+ unique_toolkit-0.8.56.dist-info/RECORD,,