unique_toolkit 1.5.1__py3-none-any.whl → 1.6.0__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.
- unique_toolkit/agentic/history_manager/history_manager.py +1 -1
- unique_toolkit/agentic/history_manager/loop_token_reducer.py +2 -17
- {unique_toolkit-1.5.1.dist-info → unique_toolkit-1.6.0.dist-info}/METADATA +3 -1
- {unique_toolkit-1.5.1.dist-info → unique_toolkit-1.6.0.dist-info}/RECORD +6 -6
- {unique_toolkit-1.5.1.dist-info → unique_toolkit-1.6.0.dist-info}/LICENSE +0 -0
- {unique_toolkit-1.5.1.dist-info → unique_toolkit-1.6.0.dist-info}/WHEEL +0 -0
@@ -228,7 +228,7 @@ class HistoryManager:
|
|
228
228
|
Returns:
|
229
229
|
LanguageModelMessages: The user visible chat history.
|
230
230
|
"""
|
231
|
-
history = await self._token_reducer.
|
231
|
+
history = await self._token_reducer.get_history_from_db()
|
232
232
|
if assistant_message_text:
|
233
233
|
history.append(
|
234
234
|
LanguageModelAssistantMessage(content=assistant_message_text)
|
@@ -113,21 +113,6 @@ class LoopTokenReducer:
|
|
113
113
|
|
114
114
|
return messages
|
115
115
|
|
116
|
-
async def get_user_visible_chat_history(
|
117
|
-
self, message: LanguageModelAssistantMessage
|
118
|
-
) -> LanguageModelMessages:
|
119
|
-
"""Get the user visible chat history.
|
120
|
-
|
121
|
-
Args:
|
122
|
-
message (LanguageModelAssistantMessage): The latest assistant message to append to the history, as this is not extracted from the history.
|
123
|
-
|
124
|
-
Returns:
|
125
|
-
LanguageModelMessages: The user visible chat history.
|
126
|
-
"""
|
127
|
-
history = await self._get_history_from_db()
|
128
|
-
history.append(message)
|
129
|
-
return LanguageModelMessages(history)
|
130
|
-
|
131
116
|
def _exceeds_token_limit(self, token_count: int) -> bool:
|
132
117
|
"""Check if token count exceeds the maximum allowed limit and if at least one tool call has more than one source."""
|
133
118
|
# At least one tool call should have more than one chunk as answer
|
@@ -165,7 +150,7 @@ class LoopTokenReducer:
|
|
165
150
|
rendered_system_message_string: str,
|
166
151
|
remove_from_text: Callable[[str], Awaitable[str]],
|
167
152
|
) -> list[LanguageModelMessage]:
|
168
|
-
history_from_db = await self.
|
153
|
+
history_from_db = await self.get_history_from_db(remove_from_text)
|
169
154
|
history_from_db = self._replace_user_message(
|
170
155
|
history_from_db, original_user_message, rendered_user_message_string
|
171
156
|
)
|
@@ -237,7 +222,7 @@ class LoopTokenReducer:
|
|
237
222
|
]
|
238
223
|
return history
|
239
224
|
|
240
|
-
async def
|
225
|
+
async def get_history_from_db(
|
241
226
|
self, remove_from_text: Callable[[str], Awaitable[str]] | None = None
|
242
227
|
) -> list[LanguageModelMessage]:
|
243
228
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_toolkit
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.6.0
|
4
4
|
Summary:
|
5
5
|
License: Proprietary
|
6
6
|
Author: Cedric Klinkert
|
@@ -118,6 +118,8 @@ All notable changes to this project will be documented in this file.
|
|
118
118
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
119
119
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
120
120
|
|
121
|
+
## [1.6.0] - 2025-10-01
|
122
|
+
- revert and simplify 1.5.0
|
121
123
|
|
122
124
|
## [1.5.1] - 2025-10-01
|
123
125
|
- Fix filtering logic to raise a ConfigurationException if chat event filters are not specified
|
@@ -42,8 +42,8 @@ unique_toolkit/agentic/evaluation/schemas.py,sha256=m9JMCUmeqP8KhsJOVEzsz6dRXUe1
|
|
42
42
|
unique_toolkit/agentic/evaluation/tests/test_context_relevancy_service.py,sha256=4tDxHTApbaTMxN1sNS8WCqj2BweRk6YqZ5_zHP45jto,7977
|
43
43
|
unique_toolkit/agentic/evaluation/tests/test_output_parser.py,sha256=RN_HcBbU6qy_e_PoYyUFcjWnp3ymJ6-gLj6TgEOupAI,3107
|
44
44
|
unique_toolkit/agentic/history_manager/history_construction_with_contents.py,sha256=c8Zy3erSbHGT8AdICRRlSK91T_FN6tNpTznvUzpLbWk,9023
|
45
|
-
unique_toolkit/agentic/history_manager/history_manager.py,sha256=
|
46
|
-
unique_toolkit/agentic/history_manager/loop_token_reducer.py,sha256=
|
45
|
+
unique_toolkit/agentic/history_manager/history_manager.py,sha256=_pTo30ktqoAFZZqaqeqU5_lCxk2oRD6qMFNtu6MFhTE,9216
|
46
|
+
unique_toolkit/agentic/history_manager/loop_token_reducer.py,sha256=3QSDXZ9M12-cDhYr7-UgDYGEMySkXENt1OkfD0CruQ8,18538
|
47
47
|
unique_toolkit/agentic/history_manager/utils.py,sha256=NDSSz0Jp3oVJU3iKlVScmM1AOe-6hTiVjLr16DUPsV0,5656
|
48
48
|
unique_toolkit/agentic/postprocessor/postprocessor_manager.py,sha256=GDzJhaoOUwxZ37IINkQ7au4CHmAOFS5miP2lqv8ZwZA,4277
|
49
49
|
unique_toolkit/agentic/reference_manager/reference_manager.py,sha256=1GeoFX1-RLdTcns1358GJADDSAcTAM2J0jJJpln08qo,4005
|
@@ -138,7 +138,7 @@ unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJ
|
|
138
138
|
unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBuE9sI2o9Aajqjxg,8884
|
139
139
|
unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
140
140
|
unique_toolkit/smart_rules/compile.py,sha256=cxWjb2dxEI2HGsakKdVCkSNi7VK9mr08w5sDcFCQyWI,9553
|
141
|
-
unique_toolkit-1.
|
142
|
-
unique_toolkit-1.
|
143
|
-
unique_toolkit-1.
|
144
|
-
unique_toolkit-1.
|
141
|
+
unique_toolkit-1.6.0.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
142
|
+
unique_toolkit-1.6.0.dist-info/METADATA,sha256=35ET4vLnor1H1jw5K4u19CDHiTtihtW4nCBfcyg7dLA,34567
|
143
|
+
unique_toolkit-1.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
144
|
+
unique_toolkit-1.6.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|