unique_toolkit 0.8.33__py3-none-any.whl → 0.8.34__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/app/dev_util.py +24 -0
- unique_toolkit/content/service.py +10 -2
- unique_toolkit/embedding/service.py +7 -1
- unique_toolkit/language_model/service.py +6 -1
- {unique_toolkit-0.8.33.dist-info → unique_toolkit-0.8.34.dist-info}/METADATA +4 -1
- {unique_toolkit-0.8.33.dist-info → unique_toolkit-0.8.34.dist-info}/RECORD +8 -8
- {unique_toolkit-0.8.33.dist-info → unique_toolkit-0.8.34.dist-info}/LICENSE +0 -0
- {unique_toolkit-0.8.33.dist-info → unique_toolkit-0.8.34.dist-info}/WHEEL +0 -0
unique_toolkit/app/dev_util.py
CHANGED
|
@@ -78,6 +78,30 @@ def get_event_generator(
|
|
|
78
78
|
continue
|
|
79
79
|
|
|
80
80
|
|
|
81
|
+
def get_event_stream(
|
|
82
|
+
event_type: type[T] = BaseEvent,
|
|
83
|
+
settings_config: UniqueSettings | str | None = None,
|
|
84
|
+
) -> Generator[T, None, None]:
|
|
85
|
+
"""
|
|
86
|
+
Get an event stream from the SSE client.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
event_type: The type of event to get
|
|
90
|
+
settings_or_filename: The settings or filename to use to setup the Unique settings object
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
if isinstance(settings_config, str):
|
|
94
|
+
unique_settings = UniqueSettings.from_env_auto_with_sdk_init(
|
|
95
|
+
filename=settings_config
|
|
96
|
+
)
|
|
97
|
+
elif isinstance(settings_config, UniqueSettings):
|
|
98
|
+
unique_settings = settings_config
|
|
99
|
+
else:
|
|
100
|
+
unique_settings = UniqueSettings.from_env_auto_with_sdk_init()
|
|
101
|
+
|
|
102
|
+
return get_event_generator(unique_settings, event_type)
|
|
103
|
+
|
|
104
|
+
|
|
81
105
|
def run_demo_with_sse_client(
|
|
82
106
|
unique_settings: UniqueSettings,
|
|
83
107
|
handler: Callable[[BaseEvent], Awaitable[None] | None],
|
|
@@ -135,11 +135,19 @@ class ContentService:
|
|
|
135
135
|
|
|
136
136
|
@classmethod
|
|
137
137
|
def from_settings(
|
|
138
|
-
cls,
|
|
138
|
+
cls,
|
|
139
|
+
settings: UniqueSettings | str | None = None,
|
|
140
|
+
metadata_filter: dict | None = None,
|
|
139
141
|
):
|
|
140
142
|
"""
|
|
141
|
-
Initialize the ContentService with a settings object.
|
|
143
|
+
Initialize the ContentService with a settings object and metadata filter.
|
|
142
144
|
"""
|
|
145
|
+
|
|
146
|
+
if settings is None:
|
|
147
|
+
settings = UniqueSettings.from_env_auto_with_sdk_init()
|
|
148
|
+
elif isinstance(settings, str):
|
|
149
|
+
settings = UniqueSettings.from_env_auto_with_sdk_init(filename=settings)
|
|
150
|
+
|
|
143
151
|
return cls(
|
|
144
152
|
company_id=settings.auth.company_id.get_secret_value(),
|
|
145
153
|
user_id=settings.auth.user_id.get_secret_value(),
|
|
@@ -56,10 +56,16 @@ class EmbeddingService(BaseService):
|
|
|
56
56
|
return cls(company_id=event.company_id, user_id=event.user_id)
|
|
57
57
|
|
|
58
58
|
@classmethod
|
|
59
|
-
def from_settings(cls, settings: UniqueSettings):
|
|
59
|
+
def from_settings(cls, settings: UniqueSettings | str | None = None):
|
|
60
60
|
"""
|
|
61
61
|
Initialize the EmbeddingService with a settings object.
|
|
62
62
|
"""
|
|
63
|
+
|
|
64
|
+
if settings is None:
|
|
65
|
+
settings = UniqueSettings.from_env_auto_with_sdk_init()
|
|
66
|
+
elif isinstance(settings, str):
|
|
67
|
+
settings = UniqueSettings.from_env_auto_with_sdk_init(filename=settings)
|
|
68
|
+
|
|
63
69
|
return cls(
|
|
64
70
|
company_id=settings.auth.company_id.get_secret_value(),
|
|
65
71
|
user_id=settings.auth.user_id.get_secret_value(),
|
|
@@ -91,10 +91,15 @@ class LanguageModelService:
|
|
|
91
91
|
return cls(company_id=event.company_id, user_id=event.user_id)
|
|
92
92
|
|
|
93
93
|
@classmethod
|
|
94
|
-
def from_settings(cls, settings: UniqueSettings):
|
|
94
|
+
def from_settings(cls, settings: UniqueSettings | str | None = None):
|
|
95
95
|
"""
|
|
96
96
|
Initialize the LanguageModelService with a settings object.
|
|
97
97
|
"""
|
|
98
|
+
if settings is None:
|
|
99
|
+
settings = UniqueSettings.from_env_auto_with_sdk_init()
|
|
100
|
+
elif isinstance(settings, str):
|
|
101
|
+
settings = UniqueSettings.from_env_auto_with_sdk_init(filename=settings)
|
|
102
|
+
|
|
98
103
|
return cls(
|
|
99
104
|
company_id=settings.auth.company_id.get_secret_value(),
|
|
100
105
|
user_id=settings.auth.user_id.get_secret_value(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_toolkit
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.34
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -116,6 +116,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
116
116
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
117
117
|
|
|
118
118
|
|
|
119
|
+
## [0.8.34] - 2025-09-01
|
|
120
|
+
- Automatic initializations of services and event generator
|
|
121
|
+
|
|
119
122
|
## [0.8.33] - 2025-08-31
|
|
120
123
|
|
|
121
124
|
fixed tool for `web_search`
|
|
@@ -16,7 +16,7 @@ unique_toolkit/_common/utils/structured_output/schema.py,sha256=Tp7kDYcmKtnUhcuR
|
|
|
16
16
|
unique_toolkit/_common/validate_required_values.py,sha256=Y_M1ub9gIKP9qZ45F6Zq3ZHtuIqhmOjl8Z2Vd3avg8w,588
|
|
17
17
|
unique_toolkit/_common/validators.py,sha256=aZwbMho7XszN7lT5RtemaiXgC0WJ4u40oeVgsNGhF4U,2803
|
|
18
18
|
unique_toolkit/app/__init__.py,sha256=ETxYDpEizg_PKmi4JPX_P76ySq-us-xypfAIdKQ1QZU,1284
|
|
19
|
-
unique_toolkit/app/dev_util.py,sha256=
|
|
19
|
+
unique_toolkit/app/dev_util.py,sha256=1C5aGUQnyO8Kot9i35PPFl4B32Oj9eK22WKTP_BrfwY,5063
|
|
20
20
|
unique_toolkit/app/init_logging.py,sha256=Sh26SRxOj8i8dzobKhYha2lLrkrMTHfB1V4jR3h23gQ,678
|
|
21
21
|
unique_toolkit/app/init_sdk.py,sha256=5_oDoETr6akwYyBCb0ivTdMNu3SVgPSkrXcDS6ELyY8,2269
|
|
22
22
|
unique_toolkit/app/performance/async_tasks.py,sha256=H0l3OAcosLwNHZ8d2pd-Di4wHIXfclEvagi5kfqLFPA,1941
|
|
@@ -35,14 +35,14 @@ unique_toolkit/content/__init__.py,sha256=EdJg_A_7loEtCQf4cah3QARQreJx6pdz89Rm96
|
|
|
35
35
|
unique_toolkit/content/constants.py,sha256=1iy4Y67xobl5VTnJB6SxSyuoBWbdLl9244xfVMUZi5o,60
|
|
36
36
|
unique_toolkit/content/functions.py,sha256=HZtDIAH3ZxWleq5Si_v30n_7vTnNRu6BCxpTHb9TxdA,18635
|
|
37
37
|
unique_toolkit/content/schemas.py,sha256=KJ604BOx0vBh2AwlTCZkOo55aHsI6yj8vxDAARKKqEo,2995
|
|
38
|
-
unique_toolkit/content/service.py,sha256=
|
|
38
|
+
unique_toolkit/content/service.py,sha256=0g1aWbjKkHRo-ZiVlDICvCtYEO29WDs8R-rGHGg4_QE,23724
|
|
39
39
|
unique_toolkit/content/utils.py,sha256=qNVmHTuETaPNGqheg7TbgPr1_1jbNHDc09N5RrmUIyo,7901
|
|
40
40
|
unique_toolkit/debug_info_manager/debug_info_manager.py,sha256=7c2yb3ES0yu-SJy3o7EwpuCBGaq_8IOMEAvD-BQ-eLI,576
|
|
41
41
|
unique_toolkit/embedding/__init__.py,sha256=uUyzjonPvuDCYsvXCIt7ErQXopLggpzX-MEQd3_e2kE,250
|
|
42
42
|
unique_toolkit/embedding/constants.py,sha256=Lj8-Lcy1FvuC31PM9Exq7vaFuxQV4pEI1huUMFX-J2M,52
|
|
43
43
|
unique_toolkit/embedding/functions.py,sha256=3qp-BfuMAbnp8YB04rh3xH8vsJuCBPizoy-JeaBFtoQ,1944
|
|
44
44
|
unique_toolkit/embedding/schemas.py,sha256=1GvKCaSk4jixzVQ2PKq8yDqwGEVY_hWclYtoAr6CC2g,96
|
|
45
|
-
unique_toolkit/embedding/service.py,sha256=
|
|
45
|
+
unique_toolkit/embedding/service.py,sha256=XViQCbjG9yznIFhWjgBkla_4s7zM2lO12Cqob1FU63k,5283
|
|
46
46
|
unique_toolkit/embedding/utils.py,sha256=v86lo__bCJbxZBQ3OcLu5SuwT6NbFfWlcq8iyk6BuzQ,279
|
|
47
47
|
unique_toolkit/evals/config.py,sha256=ywHIrJs5SFdKr1WXfrofWuFfzb0iPQw8iZDpq5oEug4,953
|
|
48
48
|
unique_toolkit/evals/context_relevancy/prompts.py,sha256=EdHFUOB581yVxcOL8482KUv_LzaRjuiem71EF8udYMc,1331
|
|
@@ -92,7 +92,7 @@ unique_toolkit/language_model/infos.py,sha256=fKmpTEvrHotGFo-PHkLpdlmk57UyFLCkuP
|
|
|
92
92
|
unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
|
|
93
93
|
unique_toolkit/language_model/reference.py,sha256=nkX2VFz-IrUz8yqyc3G5jUMNwrNpxITBrMEKkbqqYoI,8583
|
|
94
94
|
unique_toolkit/language_model/schemas.py,sha256=EOgy-p1GRcS46Sq0qEsN8MfOMl-KCcvEd9aCmqm9d08,16497
|
|
95
|
-
unique_toolkit/language_model/service.py,sha256=
|
|
95
|
+
unique_toolkit/language_model/service.py,sha256=JkYGtCug8POQskTv_aoYkzTMOaPCWRM94y73o3bUttQ,12019
|
|
96
96
|
unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0tAFc3VCRc,1902
|
|
97
97
|
unique_toolkit/postprocessor/postprocessor_manager.py,sha256=yf34VMwZfwGjmDbVeMJ5JN3ET4N68V39EF9kiWVUa_Y,4213
|
|
98
98
|
unique_toolkit/protocols/support.py,sha256=V15WEIFKVMyF1QCnR8vIi4GrJy4dfTCB6d6JlqPZ58o,2341
|
|
@@ -129,7 +129,7 @@ unique_toolkit/tools/utils/execution/execution.py,sha256=vjG2Y6awsGNtlvyQAGCTthQ
|
|
|
129
129
|
unique_toolkit/tools/utils/source_handling/schema.py,sha256=vzAyf6ZWNexjMO0OrnB8y2glGkvAilmGGQXd6zcDaKw,870
|
|
130
130
|
unique_toolkit/tools/utils/source_handling/source_formatting.py,sha256=C7uayNbdkNVJdEARA5CENnHtNY1SU6etlaqbgHNyxaQ,9152
|
|
131
131
|
unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py,sha256=oM5ZxEgzROrnX1229KViCAFjRxl9wCTzWZoinYSHleM,6979
|
|
132
|
-
unique_toolkit-0.8.
|
|
133
|
-
unique_toolkit-0.8.
|
|
134
|
-
unique_toolkit-0.8.
|
|
135
|
-
unique_toolkit-0.8.
|
|
132
|
+
unique_toolkit-0.8.34.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
|
133
|
+
unique_toolkit-0.8.34.dist-info/METADATA,sha256=7QgmsTH7dImdgUvj3KVXNmSn0Nt5zyHM7gycQXERJj8,29752
|
|
134
|
+
unique_toolkit-0.8.34.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
135
|
+
unique_toolkit-0.8.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|