unique_toolkit 1.28.9__py3-none-any.whl → 1.29.1__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.
@@ -5,6 +5,7 @@ Target of the method is to extend the step tracking on all levels of the tool.
5
5
  """
6
6
 
7
7
  from collections import defaultdict
8
+ from logging import getLogger
8
9
 
9
10
  from unique_toolkit.chat.schemas import (
10
11
  MessageLogDetails,
@@ -14,6 +15,8 @@ from unique_toolkit.chat.schemas import (
14
15
  from unique_toolkit.chat.service import ChatService
15
16
  from unique_toolkit.content.schemas import ContentReference
16
17
 
18
+ _LOGGER = getLogger(__name__)
19
+
17
20
  # Per-request counters for message log ordering - keyed by message_id
18
21
  # This is a mandatory global variable since we have in the system a bug which makes it impossible to use it as a proper class variable.
19
22
  _request_counters = defaultdict(int)
@@ -71,6 +74,12 @@ class MessageStepLogger:
71
74
  """
72
75
 
73
76
  # Creating a new message log entry with the found hits.
77
+ if not self._chat_service._assistant_message_id:
78
+ _LOGGER.warning(
79
+ "Assistant message id is not set. Skipping message log entry creation."
80
+ )
81
+ return
82
+
74
83
  _ = self._chat_service.create_message_log(
75
84
  message_id=self._chat_service._assistant_message_id,
76
85
  text=text,
@@ -43,3 +43,7 @@ class SubAgentDisplayConfig(BaseModel):
43
43
  default="before",
44
44
  description="The position of the sub agent response in the main agent response.",
45
45
  )
46
+ force_include_references: bool = Field(
47
+ default=False,
48
+ description="If set, the sub agent references will be added to the main agent response references even in not mentioned in the main agent response text.",
49
+ )
@@ -60,6 +60,8 @@ class SubAgentResponsesDisplayPostprocessor(Postprocessor):
60
60
  display_spec.assistant_id: display_spec
61
61
  for display_spec in display_specs
62
62
  if display_spec.display_config.mode != SubAgentResponseDisplayMode.HIDDEN
63
+ # We should keep track of these messages even if they are hidden
64
+ or display_spec.display_config.force_include_references
63
65
  }
64
66
 
65
67
  @override
@@ -114,6 +116,9 @@ class SubAgentResponsesDisplayPostprocessor(Postprocessor):
114
116
  response.sequence_number,
115
117
  )
116
118
 
119
+ if tool_info.display_config.mode == SubAgentResponseDisplayMode.HIDDEN:
120
+ continue
121
+
117
122
  answer = get_sub_agent_answer_display(
118
123
  display_name=display_name,
119
124
  display_config=tool_info.display_config,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 1.28.9
3
+ Version: 1.29.1
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -120,6 +120,12 @@ All notable changes to this project will be documented in this file.
120
120
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
121
121
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
122
122
 
123
+ ## [1.29.1] - 2025-11-21
124
+ - Add early return in `create_message_log_entry` if chat_service doesn't have assistant_message_id (relevant for agentic table)
125
+
126
+ ## [1.29.0] - 2025-11-21
127
+ - Add option to force include references in sub agent responses even if unused by main agent response.
128
+
123
129
  ## [1.28.9] - 2025-11-21
124
130
  - Remove `knolwedge_base_service` from DocXGeneratorService
125
131
 
@@ -59,7 +59,7 @@ unique_toolkit/agentic/history_manager/history_manager.py,sha256=7V7_173XkAjc8ot
59
59
  unique_toolkit/agentic/history_manager/loop_token_reducer.py,sha256=4XUX2-yVBnaYthV8p0zj2scVBUdK_3IhxBgoNlrytyQ,18498
60
60
  unique_toolkit/agentic/history_manager/utils.py,sha256=VIn_UmcR3jHtpux0qp5lQQzczgAm8XYSeQiPo87jC3A,3143
61
61
  unique_toolkit/agentic/message_log_manager/__init__.py,sha256=3-KY_sGkPbNoSnrzwPY0FQIJNnsz4NHXvocXgGRUeuE,169
62
- unique_toolkit/agentic/message_log_manager/service.py,sha256=sNl6QG4A_znn7d2_qNYgKBHjZLhlL4brSFGPiW2rkcE,2788
62
+ unique_toolkit/agentic/message_log_manager/service.py,sha256=AiuIq2dKQg9Y8bEYgGcve1X8-WRRdqPZXaZXXLJxfFM,3057
63
63
  unique_toolkit/agentic/postprocessor/postprocessor_manager.py,sha256=s6HFhA61TE05aAay15NFTWI1JvdSlxmGpEVfpBbGFyM,7684
64
64
  unique_toolkit/agentic/reference_manager/reference_manager.py,sha256=x51CT0D8HHu2LzgXdHGy0leOYpjnsxVbPZ2nc28G9mA,4005
65
65
  unique_toolkit/agentic/responses_api/__init__.py,sha256=9WTO-ef7fGE9Y1QtZJFm8Q_jkwK8Srtl-HWvpAD2Wxs,668
@@ -80,8 +80,8 @@ unique_toolkit/agentic/tools/a2a/manager.py,sha256=pk06UUXKQdIUY-PyykYiItubBjmIy
80
80
  unique_toolkit/agentic/tools/a2a/postprocessing/__init__.py,sha256=aVtUBPN7kDrqA6Bze34AbqQpcBBqpvfyJG-xF65w7R0,659
81
81
  unique_toolkit/agentic/tools/a2a/postprocessing/_display_utils.py,sha256=iIuddL5qJlPiPHLcMXVXzZfBtYsZTzMfaSk1et5LWUY,5461
82
82
  unique_toolkit/agentic/tools/a2a/postprocessing/_ref_utils.py,sha256=E3KybH9SX5oOkh14sSaIaLnht4DhKVrHAiUkoACNBsg,2430
83
- unique_toolkit/agentic/tools/a2a/postprocessing/config.py,sha256=XhOeGu2qi_amz4VY2qF1ZGYQ1frYeVmVtAWYaKskgfY,1582
84
- unique_toolkit/agentic/tools/a2a/postprocessing/display.py,sha256=BzQUuK1wetma3GhU4YLfKG8DhhUK4a3skoK424jQyJ8,6135
83
+ unique_toolkit/agentic/tools/a2a/postprocessing/config.py,sha256=XVzZru7T-lULRsFKMJsBPY30XNSTj_MxEyGRCgBUnEk,1818
84
+ unique_toolkit/agentic/tools/a2a/postprocessing/display.py,sha256=WbT4fXo3aPiUoHGkPon_rdB86wLTmxavhfQ6AzmNexU,6398
85
85
  unique_toolkit/agentic/tools/a2a/postprocessing/references.py,sha256=DGiv8WXMjIwumI7tlpWRgV8wSxnE282ryxEf03fgck8,3465
86
86
  unique_toolkit/agentic/tools/a2a/postprocessing/test/test_display_utils.py,sha256=5fIwvSQI6J_YIHyQgME5WfxgfJOg_ad6JHcsV43jOgY,39642
87
87
  unique_toolkit/agentic/tools/a2a/postprocessing/test/test_ref_utils.py,sha256=u-eNrHjsRFcu4TmzkD5XfFrxvaIToB42YGyXZ-RpsR0,17830
@@ -183,7 +183,7 @@ unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBu
183
183
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
184
  unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
185
185
  unique_toolkit/test_utilities/events.py,sha256=_mwV2bs5iLjxS1ynDCjaIq-gjjKhXYCK-iy3dRfvO3g,6410
186
- unique_toolkit-1.28.9.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
187
- unique_toolkit-1.28.9.dist-info/METADATA,sha256=SCu5--tpbJ8nZH3KytopxJJS0dhCuU0GWNQO1wQ6C2M,43940
188
- unique_toolkit-1.28.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
189
- unique_toolkit-1.28.9.dist-info/RECORD,,
186
+ unique_toolkit-1.29.1.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
187
+ unique_toolkit-1.29.1.dist-info/METADATA,sha256=uthGA7BbiBQGrst9M84W-eUrfZ6YtHdtgzwd1vtJSiA,44224
188
+ unique_toolkit-1.29.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
189
+ unique_toolkit-1.29.1.dist-info/RECORD,,