unique_toolkit 0.6.8__py3-none-any.whl → 0.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.
- unique_toolkit/content/functions.py +0 -4
- unique_toolkit/content/service.py +5 -11
- unique_toolkit/language_model/infos.py +10 -6
- unique_toolkit/short_term_memory/service.py +2 -0
- {unique_toolkit-0.6.8.dist-info → unique_toolkit-0.7.0.dist-info}/METADATA +8 -1
- {unique_toolkit-0.6.8.dist-info → unique_toolkit-0.7.0.dist-info}/RECORD +8 -8
- {unique_toolkit-0.6.8.dist-info → unique_toolkit-0.7.0.dist-info}/LICENSE +0 -0
- {unique_toolkit-0.6.8.dist-info → unique_toolkit-0.7.0.dist-info}/WHEEL +0 -0
@@ -130,7 +130,6 @@ async def search_content_chunks_async(
|
|
130
130
|
def search_contents(
|
131
131
|
user_id: str,
|
132
132
|
company_id: str,
|
133
|
-
chat_id: str,
|
134
133
|
where: dict,
|
135
134
|
):
|
136
135
|
"""
|
@@ -152,7 +151,6 @@ def search_contents(
|
|
152
151
|
contents = unique_sdk.Content.search(
|
153
152
|
user_id=user_id,
|
154
153
|
company_id=company_id,
|
155
|
-
chatId=chat_id,
|
156
154
|
# TODO add type parameter in SDK
|
157
155
|
where=where, # type: ignore
|
158
156
|
)
|
@@ -165,7 +163,6 @@ def search_contents(
|
|
165
163
|
async def search_contents_async(
|
166
164
|
user_id: str,
|
167
165
|
company_id: str,
|
168
|
-
chat_id: str,
|
169
166
|
where: dict,
|
170
167
|
):
|
171
168
|
"""Asynchronously searches for content in the knowledge base."""
|
@@ -176,7 +173,6 @@ async def search_contents_async(
|
|
176
173
|
contents = await unique_sdk.Content.search_async(
|
177
174
|
user_id=user_id,
|
178
175
|
company_id=company_id,
|
179
|
-
chatId=chat_id,
|
180
176
|
where=where, # type: ignore
|
181
177
|
)
|
182
178
|
return map_contents(contents)
|
@@ -38,7 +38,6 @@ class ContentService:
|
|
38
38
|
company_id (str | None): The company ID.
|
39
39
|
user_id (str | None): The user ID.
|
40
40
|
metadata_filter (dict | None): The metadata filter.
|
41
|
-
chat_id (str | None): The chat ID.
|
42
41
|
"""
|
43
42
|
|
44
43
|
def __init__(
|
@@ -48,17 +47,16 @@ class ContentService:
|
|
48
47
|
user_id: str | None = None,
|
49
48
|
):
|
50
49
|
self._event = event # Changed to protected attribute
|
50
|
+
self.metadata_filter = None
|
51
51
|
if event:
|
52
52
|
self.company_id = event.company_id
|
53
53
|
self.user_id = event.user_id
|
54
54
|
if isinstance(event, (ChatEvent, Event)):
|
55
55
|
self.metadata_filter = event.payload.metadata_filter
|
56
|
-
self.chat_id = event.payload.chat_id
|
57
56
|
else:
|
58
57
|
[company_id, user_id] = validate_required_values([company_id, user_id])
|
59
58
|
self.company_id = company_id
|
60
59
|
self.user_id = user_id
|
61
|
-
self.metadata_filter = None
|
62
60
|
|
63
61
|
@property
|
64
62
|
@deprecated(
|
@@ -109,7 +107,7 @@ class ContentService:
|
|
109
107
|
searches = search_content_chunks(
|
110
108
|
user_id=self.user_id,
|
111
109
|
company_id=self.company_id,
|
112
|
-
chat_id=
|
110
|
+
chat_id="",
|
113
111
|
search_string=search_string,
|
114
112
|
search_type=search_type,
|
115
113
|
limit=limit,
|
@@ -160,7 +158,7 @@ class ContentService:
|
|
160
158
|
searches = await search_content_chunks_async(
|
161
159
|
user_id=self.user_id,
|
162
160
|
company_id=self.company_id,
|
163
|
-
chat_id=
|
161
|
+
chat_id="",
|
164
162
|
search_string=search_string,
|
165
163
|
search_type=search_type,
|
166
164
|
limit=limit,
|
@@ -193,7 +191,6 @@ class ContentService:
|
|
193
191
|
return search_contents(
|
194
192
|
user_id=self.user_id,
|
195
193
|
company_id=self.company_id,
|
196
|
-
chat_id=self.chat_id,
|
197
194
|
where=where,
|
198
195
|
)
|
199
196
|
|
@@ -213,14 +210,11 @@ class ContentService:
|
|
213
210
|
return await search_contents_async(
|
214
211
|
user_id=self.user_id,
|
215
212
|
company_id=self.company_id,
|
216
|
-
chat_id=self.chat_id,
|
217
213
|
where=where,
|
218
214
|
)
|
219
215
|
|
220
|
-
def search_content_on_chat(
|
221
|
-
|
222
|
-
) -> list[Content]:
|
223
|
-
where = {"ownerId": {"equals": self.chat_id}}
|
216
|
+
def search_content_on_chat(self, chat_id: str) -> list[Content]:
|
217
|
+
where = {"ownerId": {"equals": chat_id}}
|
224
218
|
|
225
219
|
return self.search_contents(where)
|
226
220
|
|
@@ -16,9 +16,10 @@ class LanguageModelName(StrEnum):
|
|
16
16
|
AZURE_GPT_4o_2024_0513 = "AZURE_GPT_4o_2024_0513"
|
17
17
|
AZURE_GPT_4o_2024_0806 = "AZURE_GPT_4o_2024_0806"
|
18
18
|
AZURE_GPT_4o_MINI_2024_0718 = "AZURE_GPT_4o_MINI_2024_0718"
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
AZURE_o1_PREVIEW_2024_0912 = "AZURE_o1_PREVIEW_2024_0912"
|
20
|
+
AZURE_o1_2024_1217 = "AZURE_o1_2024_1217"
|
21
|
+
AZURE_o1_MINI_2024_0912 = "AZURE_o1_MINI_2024_0912"
|
22
|
+
AZURE_o3_MINI_2025_0131 = "AZURE_o3_MINI_2025_0131"
|
22
23
|
|
23
24
|
|
24
25
|
class EncoderName(StrEnum):
|
@@ -215,7 +216,7 @@ class LanguageModelInfo(BaseModel):
|
|
215
216
|
info_cutoff_at=date(2023, 10, 1),
|
216
217
|
published_at=date(2024, 7, 18),
|
217
218
|
)
|
218
|
-
case LanguageModelName.
|
219
|
+
case LanguageModelName.AZURE_o1_2024_1217:
|
219
220
|
return cls(
|
220
221
|
name=model_name,
|
221
222
|
capabilities=[
|
@@ -234,7 +235,10 @@ class LanguageModelInfo(BaseModel):
|
|
234
235
|
info_cutoff_at=date(2023, 10, 1),
|
235
236
|
published_at=date(2024, 12, 17),
|
236
237
|
)
|
237
|
-
case
|
238
|
+
case (
|
239
|
+
LanguageModelName.AZURE_o1_MINI_2024_0912
|
240
|
+
| LanguageModelName.AZURE_o1_PREVIEW_2024_0912
|
241
|
+
):
|
238
242
|
return cls(
|
239
243
|
name=model_name,
|
240
244
|
capabilities=[
|
@@ -253,7 +257,7 @@ class LanguageModelInfo(BaseModel):
|
|
253
257
|
info_cutoff_at=date(2023, 10, 1),
|
254
258
|
published_at=date(2024, 9, 12),
|
255
259
|
)
|
256
|
-
case LanguageModelName.
|
260
|
+
case LanguageModelName.AZURE_o3_MINI_2025_0131:
|
257
261
|
return cls(
|
258
262
|
name=model_name,
|
259
263
|
capabilities=[
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_toolkit
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.7.0
|
4
4
|
Summary:
|
5
5
|
License: Proprietary
|
6
6
|
Author: Martin Fadler
|
@@ -111,6 +111,13 @@ All notable changes to this project will be documented in this file.
|
|
111
111
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
112
112
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
113
113
|
|
114
|
+
## [0.7.0] - 2025-03-11
|
115
|
+
- Fix the issue with `ShortTermMemoryService.create_memory_async` adding `self.chat_id` and `self.message_id` as part of the parameter.
|
116
|
+
- Breaking chang: `ContentService.search_content_on_chat` now requires you pass in a `chat_id` for the specific chat instance
|
117
|
+
|
118
|
+
## [0.6.9] - 2025-03-11
|
119
|
+
- Add o1-preview as part of the language model info, make the name consistent across board.
|
120
|
+
|
114
121
|
## [0.6.8] - 2025-03-11
|
115
122
|
- Add `verify_request_and_construct_event` to `verification.py`
|
116
123
|
|
@@ -20,9 +20,9 @@ unique_toolkit/chat/state.py,sha256=Cjgwv_2vhDFbV69xxsn7SefhaoIAEqLx3ferdVFCnOg,
|
|
20
20
|
unique_toolkit/chat/utils.py,sha256=ihm-wQykBWhB4liR3LnwPVPt_qGW6ETq21Mw4HY0THE,854
|
21
21
|
unique_toolkit/content/__init__.py,sha256=EdJg_A_7loEtCQf4cah3QARQreJx6pdz89Rm96YbMVg,940
|
22
22
|
unique_toolkit/content/constants.py,sha256=1iy4Y67xobl5VTnJB6SxSyuoBWbdLl9244xfVMUZi5o,60
|
23
|
-
unique_toolkit/content/functions.py,sha256=
|
23
|
+
unique_toolkit/content/functions.py,sha256=iuclQjuiupIJPk0-6ldl35EVkQ2h34_dxKxWisMrxWM,17001
|
24
24
|
unique_toolkit/content/schemas.py,sha256=zks_Pkki2VhxICJJgHZyc-LPmRuj5dLbw3pgcUT7SW8,2362
|
25
|
-
unique_toolkit/content/service.py,sha256=
|
25
|
+
unique_toolkit/content/service.py,sha256=xcFN-vUakuovuzMXMN8qOmdlUzt2f1ZwHE4RzOWYjnQ,14040
|
26
26
|
unique_toolkit/content/utils.py,sha256=GUVPrkZfMoAj4MRoBs5BD_7vSuLZTZx69hyWzYFrI50,7747
|
27
27
|
unique_toolkit/embedding/__init__.py,sha256=uUyzjonPvuDCYsvXCIt7ErQXopLggpzX-MEQd3_e2kE,250
|
28
28
|
unique_toolkit/embedding/constants.py,sha256=Lj8-Lcy1FvuC31PM9Exq7vaFuxQV4pEI1huUMFX-J2M,52
|
@@ -48,7 +48,7 @@ unique_toolkit/language_model/__init__.py,sha256=jWko_vQj48wjnpTtlkg8iNdef0SMI3F
|
|
48
48
|
unique_toolkit/language_model/builder.py,sha256=_lUL2shMN1Je2LLYu2PiehOvfWtn5pg1yUuYyiw3f_c,2710
|
49
49
|
unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
|
50
50
|
unique_toolkit/language_model/functions.py,sha256=I5jHhHsKoq7GwEQyTrM8LXB2n_6dvMAk7UklenjuHSY,7945
|
51
|
-
unique_toolkit/language_model/infos.py,sha256=
|
51
|
+
unique_toolkit/language_model/infos.py,sha256=HRdQLG3oetwc-bPHtsXvDRRLsK7fSsC1q8FubvxLMsw,16459
|
52
52
|
unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
|
53
53
|
unique_toolkit/language_model/schemas.py,sha256=rrwzUgKANFOrdehCULW8Hh03uRW3tsE5dXpWqxmClfg,8618
|
54
54
|
unique_toolkit/language_model/service.py,sha256=GupYD4uDZjy1TfVQW3jichmgQwiSgQCj350FtL4O0W4,5569
|
@@ -57,8 +57,8 @@ unique_toolkit/short_term_memory/__init__.py,sha256=2mI3AUrffgH7Yt-xS57EGqnHf7jn
|
|
57
57
|
unique_toolkit/short_term_memory/constants.py,sha256=698CL6-wjup2MvU19RxSmQk3gX7aqW_OOpZB7sbz_Xg,34
|
58
58
|
unique_toolkit/short_term_memory/functions.py,sha256=3WiK-xatY5nh4Dr5zlDUye1k3E6kr41RiscwtTplw5k,4484
|
59
59
|
unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJs8FEZXcgQTNenw,1406
|
60
|
-
unique_toolkit/short_term_memory/service.py,sha256=
|
61
|
-
unique_toolkit-0.
|
62
|
-
unique_toolkit-0.
|
63
|
-
unique_toolkit-0.
|
64
|
-
unique_toolkit-0.
|
60
|
+
unique_toolkit/short_term_memory/service.py,sha256=0wrwuo6K17Edcuiwp5LMCvxFuBSDP82HF0_5qwi0nYc,5307
|
61
|
+
unique_toolkit-0.7.0.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
62
|
+
unique_toolkit-0.7.0.dist-info/METADATA,sha256=jDT49L28AksCEFj_0CXSyHJKg5Q2IWGXqNYLr0ninHY,20561
|
63
|
+
unique_toolkit-0.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
64
|
+
unique_toolkit-0.7.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|