unique_toolkit 2026.46.0.dev12__py3-none-any.whl → 2026.46.0.dev13__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/chat_title/service.py +6 -2
- {unique_toolkit-2026.46.0.dev12.dist-info → unique_toolkit-2026.46.0.dev13.dist-info}/METADATA +1 -1
- {unique_toolkit-2026.46.0.dev12.dist-info → unique_toolkit-2026.46.0.dev13.dist-info}/RECORD +4 -4
- {unique_toolkit-2026.46.0.dev12.dist-info → unique_toolkit-2026.46.0.dev13.dist-info}/WHEEL +0 -0
|
@@ -10,6 +10,7 @@ from unique_toolkit.agentic.chat_title.prompts import (
|
|
|
10
10
|
CHAT_TITLE_SYSTEM_PROMPT,
|
|
11
11
|
CHAT_TITLE_USER_PROMPT_TEMPLATE,
|
|
12
12
|
)
|
|
13
|
+
from unique_toolkit.chat.schemas import ChatMessageRole
|
|
13
14
|
from unique_toolkit.chat.service import ChatService
|
|
14
15
|
from unique_toolkit.language_model.builder import MessagesBuilder
|
|
15
16
|
from unique_toolkit.language_model.infos import LanguageModelInfo
|
|
@@ -61,7 +62,9 @@ def clean_title(raw: str) -> str | None:
|
|
|
61
62
|
class ChatTitleGenerator:
|
|
62
63
|
"""Replaces the prompt-based title of a new chat with a short generated one.
|
|
63
64
|
|
|
64
|
-
Runs once per chat: it does nothing when the chat
|
|
65
|
+
Runs once per chat: it does nothing when the chat history has an earlier
|
|
66
|
+
user message. Assistant-only history, such as the segment a scheduled run
|
|
67
|
+
stores before its prompt, does not count as an earlier turn.
|
|
65
68
|
Never raises; on any failure the existing title is kept. Logs carry no
|
|
66
69
|
prompt or title text.
|
|
67
70
|
"""
|
|
@@ -92,7 +95,8 @@ class ChatTitleGenerator:
|
|
|
92
95
|
return None
|
|
93
96
|
|
|
94
97
|
try:
|
|
95
|
-
|
|
98
|
+
history = await self._chat_service.get_full_history_async()
|
|
99
|
+
if any(message.role == ChatMessageRole.USER for message in history):
|
|
96
100
|
return None
|
|
97
101
|
|
|
98
102
|
title = await self._generate(user_message[:_USER_MESSAGE_MAX_CHARS])
|
{unique_toolkit-2026.46.0.dev12.dist-info → unique_toolkit-2026.46.0.dev13.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-toolkit
|
|
3
|
-
Version: 2026.46.0.
|
|
3
|
+
Version: 2026.46.0.dev13
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
|
|
6
6
|
Author-email: Cedric Klinkert <cedric.klinkert@unique.ch>, Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>, Ejiroghene Oki-Peter <oki-peter.ejiroghene@unique.ai>, Rami Azouz <rami.ext@unique.ch>, Ricardo Visini <ricardo.visini@unique.ch>, Sanzio Monti <sanzio.monti@unique.ai>
|
{unique_toolkit-2026.46.0.dev12.dist-info → unique_toolkit-2026.46.0.dev13.dist-info}/RECORD
RENAMED
|
@@ -86,7 +86,7 @@ unique_toolkit/_common/validators.py,sha256=ElnkMsyEY24TfzfTVHvireyT39EnZgW5N40T
|
|
|
86
86
|
unique_toolkit/agentic/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
87
87
|
unique_toolkit/agentic/chat_title/__init__.py,sha256=oGRkOOvF2uy7EyaM8aomB9xbam0bYH60S7zmoQCkLkE,151
|
|
88
88
|
unique_toolkit/agentic/chat_title/prompts.py,sha256=Ao2zCkthPgyhFuRCUYTDpyeT9FGozK-0Ydv7XktfIgo,518
|
|
89
|
-
unique_toolkit/agentic/chat_title/service.py,sha256=
|
|
89
|
+
unique_toolkit/agentic/chat_title/service.py,sha256=YZaTCHCwC_SDYXFpr8758ZBRqfOXX9G6aSfReiAL-5Y,5433
|
|
90
90
|
unique_toolkit/agentic/debug_info_manager/debug_info_manager.py,sha256=SbVR3G0PNFdNePJVzH8_0ShFQm_iGUTJemfAoB0Lc7Q,12465
|
|
91
91
|
unique_toolkit/agentic/debug_info_manager/test/test_debug_info_manager.py,sha256=bDjrHLqfwtd7ewdIdyTFHabG-15t3iXvs34ywoYXcik,11888
|
|
92
92
|
unique_toolkit/agentic/evaluation/config.py,sha256=u5-iuT-4mfA2_9UZjZ-TN3YutVf35aR4EsF9l61Odnk,1696
|
|
@@ -434,6 +434,6 @@ unique_toolkit/short_term_memory/service.py,sha256=2JMBEBn6GoyK-a0xvdcWpPft-3C74
|
|
|
434
434
|
unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
435
435
|
unique_toolkit/smart_rules/compile.py,sha256=vRe0aMJWuVIK-VsqomgxQImzke7MDmwgSxxJfYCa7zw,1386
|
|
436
436
|
unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
|
|
437
|
-
unique_toolkit-2026.46.0.
|
|
438
|
-
unique_toolkit-2026.46.0.
|
|
439
|
-
unique_toolkit-2026.46.0.
|
|
437
|
+
unique_toolkit-2026.46.0.dev13.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
438
|
+
unique_toolkit-2026.46.0.dev13.dist-info/METADATA,sha256=RnFfCZBJJLA_OPicmVRLhHhxvZNIWdW3iHDrXYOqqVQ,7822
|
|
439
|
+
unique_toolkit-2026.46.0.dev13.dist-info/RECORD,,
|
|
File without changes
|