unique_toolkit 2026.32.0.dev1__py3-none-any.whl → 2026.32.0.dev3__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/experimental/components/content_tree/functions.py +3 -4
- unique_toolkit/monitoring/registry.py +25 -2
- unique_toolkit/services/knowledge_base.py +2 -2
- {unique_toolkit-2026.32.0.dev1.dist-info → unique_toolkit-2026.32.0.dev3.dist-info}/METADATA +4 -4
- {unique_toolkit-2026.32.0.dev1.dist-info → unique_toolkit-2026.32.0.dev3.dist-info}/RECORD +6 -6
- {unique_toolkit-2026.32.0.dev1.dist-info → unique_toolkit-2026.32.0.dev3.dist-info}/WHEEL +0 -0
|
@@ -107,9 +107,8 @@ async def translate_scope_id_async(
|
|
|
107
107
|
) -> str | None:
|
|
108
108
|
"""Resolve a single ``scope_id`` to a folder name.
|
|
109
109
|
|
|
110
|
-
Returns ``None``
|
|
111
|
-
|
|
112
|
-
operation.
|
|
110
|
+
Returns ``None`` if the folder lookup fails (logged at debug; callers fall back
|
|
111
|
+
to the raw ``scope_id``), so batch resolution is not aborted by a single miss.
|
|
113
112
|
"""
|
|
114
113
|
try:
|
|
115
114
|
folder_info = await get_folder_info_async(
|
|
@@ -119,7 +118,7 @@ async def translate_scope_id_async(
|
|
|
119
118
|
)
|
|
120
119
|
return folder_info.name
|
|
121
120
|
except Exception as e:
|
|
122
|
-
_LOGGER.
|
|
121
|
+
_LOGGER.debug("Could not resolve folder for scope_id %s", scope_id, exc_info=e)
|
|
123
122
|
return None
|
|
124
123
|
|
|
125
124
|
|
|
@@ -5,6 +5,7 @@ import functools
|
|
|
5
5
|
import os
|
|
6
6
|
import time
|
|
7
7
|
import warnings
|
|
8
|
+
from collections.abc import Sequence
|
|
8
9
|
from contextlib import contextmanager
|
|
9
10
|
from typing import Any, Callable, Literal
|
|
10
11
|
|
|
@@ -66,9 +67,31 @@ class MetricNamespace:
|
|
|
66
67
|
def __init__(self, prefix: str) -> None:
|
|
67
68
|
self._prefix = prefix
|
|
68
69
|
|
|
69
|
-
def histogram(
|
|
70
|
+
def histogram(
|
|
71
|
+
self,
|
|
72
|
+
name: str,
|
|
73
|
+
description: str,
|
|
74
|
+
labels: list[str],
|
|
75
|
+
buckets: Sequence[float] | None = None,
|
|
76
|
+
) -> Histogram:
|
|
77
|
+
"""Create a Histogram, optionally with custom bucket boundaries.
|
|
78
|
+
|
|
79
|
+
When ``buckets`` is omitted, prometheus_client's default buckets are used
|
|
80
|
+
(top finite bucket 10s). Provide explicit buckets for workloads whose
|
|
81
|
+
latency regularly exceeds 10s so ``histogram_quantile`` can resolve the
|
|
82
|
+
tail; observations above the largest bucket fall into the implicit +Inf
|
|
83
|
+
bucket. prometheus_client appends +Inf automatically.
|
|
84
|
+
"""
|
|
85
|
+
if buckets is None:
|
|
86
|
+
return Histogram(
|
|
87
|
+
f"{self._prefix}_{name}", description, labels, registry=REGISTRY
|
|
88
|
+
)
|
|
70
89
|
return Histogram(
|
|
71
|
-
f"{self._prefix}_{name}",
|
|
90
|
+
f"{self._prefix}_{name}",
|
|
91
|
+
description,
|
|
92
|
+
labels,
|
|
93
|
+
registry=REGISTRY,
|
|
94
|
+
buckets=tuple(buckets),
|
|
72
95
|
)
|
|
73
96
|
|
|
74
97
|
def counter(self, name: str, description: str, labels: list[str]) -> Counter:
|
|
@@ -843,8 +843,8 @@ class KnowledgeBaseService:
|
|
|
843
843
|
folder_info = await self.get_folder_info_async(scope_id=scope_id)
|
|
844
844
|
return folder_info.name
|
|
845
845
|
except Exception as e:
|
|
846
|
-
_LOGGER.
|
|
847
|
-
|
|
846
|
+
_LOGGER.debug(
|
|
847
|
+
"Could not resolve folder for scope_id %s", scope_id, exc_info=e
|
|
848
848
|
)
|
|
849
849
|
return None
|
|
850
850
|
|
{unique_toolkit-2026.32.0.dev1.dist-info → unique_toolkit-2026.32.0.dev3.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-toolkit
|
|
3
|
-
Version: 2026.32.0.
|
|
3
|
+
Version: 2026.32.0.dev3
|
|
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>
|
|
@@ -16,7 +16,7 @@ Requires-Dist: sseclient>=0.0.27,<0.0.28
|
|
|
16
16
|
Requires-Dist: openai>=1.105.0,<3
|
|
17
17
|
Requires-Dist: platformdirs>=4.0.0,<5
|
|
18
18
|
Requires-Dist: pillow>=12.1.1
|
|
19
|
-
Requires-Dist: unique-sdk>=2026.32.0.
|
|
19
|
+
Requires-Dist: unique-sdk>=2026.32.0.dev2,<2026.32.0rc0
|
|
20
20
|
Requires-Dist: jambo>=0.1.2,<0.2
|
|
21
21
|
Requires-Dist: jinja2>=3.1.6,<4
|
|
22
22
|
Requires-Dist: docxtpl>=0.20.1,<0.21
|
|
@@ -33,8 +33,8 @@ Requires-Dist: tenacity>=9.1.4
|
|
|
33
33
|
Requires-Dist: pydantic-core>=2.41.5
|
|
34
34
|
Requires-Dist: cachetools>=5.0,<6
|
|
35
35
|
Requires-Dist: rapidfuzz>=3.0,<4
|
|
36
|
-
Requires-Dist: fastapi>=0.
|
|
37
|
-
Requires-Dist: starlette>=
|
|
36
|
+
Requires-Dist: fastapi>=0.133.0,<1.0.0 ; extra == 'fastapi'
|
|
37
|
+
Requires-Dist: starlette>=1.3.1,<2.0.0 ; extra == 'fastapi'
|
|
38
38
|
Requires-Dist: uvicorn>=0.37.0,<0.38 ; extra == 'fastapi'
|
|
39
39
|
Requires-Dist: openai>=1.105.0,<3 ; extra == 'langchain'
|
|
40
40
|
Requires-Dist: langchain>=1.0.0,<2 ; extra == 'langchain'
|
|
@@ -303,7 +303,7 @@ unique_toolkit/experimental/_internal/streaming/pattern_replacer.py,sha256=RLLQK
|
|
|
303
303
|
unique_toolkit/experimental/components/__init__.py,sha256=DCVPD0b6qX1BAmFJtYVeFzJ5PmQhuD0usUQCuA95BR8,1789
|
|
304
304
|
unique_toolkit/experimental/components/_base.py,sha256=XZHKffTIy331ZQnsywl0m1XkJ4DCjHV2on5EBkaG-ik,4153
|
|
305
305
|
unique_toolkit/experimental/components/content_tree/__init__.py,sha256=30eyVB7CzDC9WZTXj-FYQNY20o0m987SV3dn6WdFI-U,2103
|
|
306
|
-
unique_toolkit/experimental/components/content_tree/functions.py,sha256=
|
|
306
|
+
unique_toolkit/experimental/components/content_tree/functions.py,sha256=Q-bk_B3k-SqP-ZW19jqOBWGIqNZoiG0cDkw3LYI0FNA,8683
|
|
307
307
|
unique_toolkit/experimental/components/content_tree/schemas.py,sha256=qRF8UUxhB616lzFSi5FV6vIdLXDHry3fWWb3eSTMJAo,3942
|
|
308
308
|
unique_toolkit/experimental/components/content_tree/service.py,sha256=U04U5Gq1jElUlVbSjefHAIefBi8KRZhKUwmotADx2GU,18907
|
|
309
309
|
unique_toolkit/experimental/components/internal_search/__init__.py,sha256=Jj-ujG_SS5-uqCrrNidRn_H0sQAeSvyWtt9Tw0pkbzI,3091
|
|
@@ -404,12 +404,12 @@ unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0
|
|
|
404
404
|
unique_toolkit/monitoring/__init__.py,sha256=z1gkOCLxGcg936MFuLSeWFa0tREcBFSUbV09NxilBw4,1065
|
|
405
405
|
unique_toolkit/monitoring/gunicorn.py,sha256=urTFFS5zYHKoxb1TEQHcLqb2byi-aYgFRHGwgYRzYYI,844
|
|
406
406
|
unique_toolkit/monitoring/middleware.py,sha256=JNh5v_INAkexuLtXhCG9n5n2t6Pnf8ZdPTnimAVS0_s,2931
|
|
407
|
-
unique_toolkit/monitoring/registry.py,sha256=
|
|
407
|
+
unique_toolkit/monitoring/registry.py,sha256=De2Bx5QBBRJQY2MM3xtntiJ2JU2FoKkVT7rNMG7ewgA,5874
|
|
408
408
|
unique_toolkit/protocols/support.py,sha256=x5edzbBmKAUuvm3oLFh52gkgQsqR5LU7M0t8RHK0DZk,5161
|
|
409
409
|
unique_toolkit/services/__init__.py,sha256=b9Wl7Wvz1JmZDbDexIZzBoXZ0wscXuczGAH8LoL-Qak,572
|
|
410
410
|
unique_toolkit/services/chat_service.py,sha256=ofhNHCW7kz6xXN4pUTBdDEYovZ7PXhUglPDgez8Qov0,99142
|
|
411
411
|
unique_toolkit/services/factory.py,sha256=7gNeanyHkgX23Iz7RMCQTCkE9gI5asCI11nXxM0jjx4,9832
|
|
412
|
-
unique_toolkit/services/knowledge_base.py,sha256=
|
|
412
|
+
unique_toolkit/services/knowledge_base.py,sha256=6dM4abcXR9y2VYoR6SK79gwjrzb83Wm8jMPPIt5z95o,43461
|
|
413
413
|
unique_toolkit/short_term_memory/__init__.py,sha256=2mI3AUrffgH7Yt-xS57EGqnHf7jnn6xquoKEhJqk3Wg,185
|
|
414
414
|
unique_toolkit/short_term_memory/constants.py,sha256=698CL6-wjup2MvU19RxSmQk3gX7aqW_OOpZB7sbz_Xg,34
|
|
415
415
|
unique_toolkit/short_term_memory/functions.py,sha256=mbEeWkJ5Jr0cvg1_m6l9aS1L6nWE5ZhviNzpKlCs-a8,7907
|
|
@@ -418,6 +418,6 @@ unique_toolkit/short_term_memory/service.py,sha256=2JMBEBn6GoyK-a0xvdcWpPft-3C74
|
|
|
418
418
|
unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
419
419
|
unique_toolkit/smart_rules/compile.py,sha256=vRe0aMJWuVIK-VsqomgxQImzke7MDmwgSxxJfYCa7zw,1386
|
|
420
420
|
unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
|
|
421
|
-
unique_toolkit-2026.32.0.
|
|
422
|
-
unique_toolkit-2026.32.0.
|
|
423
|
-
unique_toolkit-2026.32.0.
|
|
421
|
+
unique_toolkit-2026.32.0.dev3.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
422
|
+
unique_toolkit-2026.32.0.dev3.dist-info/METADATA,sha256=56S1t7gvRT_iCfhx_SeRNDxt1DERgazGT-bWdZ2CsB0,7465
|
|
423
|
+
unique_toolkit-2026.32.0.dev3.dist-info/RECORD,,
|
|
File without changes
|