unique_toolkit 1.6.0__py3-none-any.whl → 1.7.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.
@@ -217,18 +217,21 @@ class HistoryManager:
217
217
  return messages
218
218
 
219
219
  async def get_user_visible_chat_history(
220
- self, assistant_message_text: str | None = None
220
+ self,
221
+ assistant_message_text: str | None = None,
222
+ remove_from_text: Callable[[str], Awaitable[str]] | None = None,
221
223
  ) -> LanguageModelMessages:
222
224
  """Get the user visible chat history.
223
225
 
224
226
  Args:
225
227
  assistant_message_text (str | None): The latest assistant message to append to the history, as this is not extracted from the history.
226
228
  If None, the history will be returned without the latest assistant message.
229
+ remove_from_text (Callable[[str], Awaitable[str]] | None): A function to remove text from the history before returning it.
227
230
 
228
231
  Returns:
229
232
  LanguageModelMessages: The user visible chat history.
230
233
  """
231
- history = await self._token_reducer.get_history_from_db()
234
+ history = await self._token_reducer.get_history_from_db(remove_from_text)
232
235
  if assistant_message_text:
233
236
  history.append(
234
237
  LanguageModelAssistantMessage(content=assistant_message_text)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 1.6.0
3
+ Version: 1.7.0
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -118,6 +118,9 @@ 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.7.0] - 2025-10-01
122
+ - Add functionality to remove text in `get_user_visible_chat_history`
123
+
121
124
  ## [1.6.0] - 2025-10-01
122
125
  - revert and simplify 1.5.0
123
126
 
@@ -42,7 +42,7 @@ 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=_pTo30ktqoAFZZqaqeqU5_lCxk2oRD6qMFNtu6MFhTE,9216
45
+ unique_toolkit/agentic/history_manager/history_manager.py,sha256=1MSFEQtw7jYrcFVEgnTIe6LrGo36WVlutzqTwcFJq5w,9449
46
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
@@ -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.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,,
141
+ unique_toolkit-1.7.0.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
142
+ unique_toolkit-1.7.0.dist-info/METADATA,sha256=EayzMLYA56Chqh20xTaaWz3cSLOY5lk6dkvvxa9tHZA,34662
143
+ unique_toolkit-1.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
144
+ unique_toolkit-1.7.0.dist-info/RECORD,,