unique_toolkit 1.32.0__py3-none-any.whl → 1.32.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.
- unique_toolkit/chat/functions.py +1 -1
- unique_toolkit/content/functions.py +4 -4
- unique_toolkit/content/service.py +1 -1
- unique_toolkit/embedding/service.py +1 -1
- unique_toolkit/framework_utilities/langchain/__init__.py +10 -0
- unique_toolkit/framework_utilities/openai/client.py +2 -1
- unique_toolkit/services/knowledge_base.py +4 -6
- {unique_toolkit-1.32.0.dist-info → unique_toolkit-1.32.1.dist-info}/METADATA +4 -1
- {unique_toolkit-1.32.0.dist-info → unique_toolkit-1.32.1.dist-info}/RECORD +11 -10
- {unique_toolkit-1.32.0.dist-info → unique_toolkit-1.32.1.dist-info}/LICENSE +0 -0
- {unique_toolkit-1.32.0.dist-info → unique_toolkit-1.32.1.dist-info}/WHEEL +0 -0
unique_toolkit/chat/functions.py
CHANGED
|
@@ -263,7 +263,7 @@ def create_message(
|
|
|
263
263
|
references: list[ContentReference] | None = None,
|
|
264
264
|
debug_info: dict | None = None,
|
|
265
265
|
set_completed_at: bool | None = False,
|
|
266
|
-
):
|
|
266
|
+
) -> ChatMessage:
|
|
267
267
|
"""Creates a message in the chat session synchronously.
|
|
268
268
|
|
|
269
269
|
Args:
|
|
@@ -144,7 +144,7 @@ def search_contents(
|
|
|
144
144
|
chat_id: str,
|
|
145
145
|
where: dict,
|
|
146
146
|
include_failed_content: bool = False,
|
|
147
|
-
):
|
|
147
|
+
) -> list[Content]:
|
|
148
148
|
"""
|
|
149
149
|
Performs an asynchronous search for content files in the knowledge base by filter.
|
|
150
150
|
|
|
@@ -297,7 +297,7 @@ def upload_content_from_bytes(
|
|
|
297
297
|
skip_ingestion: bool = False,
|
|
298
298
|
ingestion_config: unique_sdk.Content.IngestionConfig | None = None,
|
|
299
299
|
metadata: dict[str, Any] | None = None,
|
|
300
|
-
):
|
|
300
|
+
) -> Content:
|
|
301
301
|
"""
|
|
302
302
|
Uploads content to the knowledge base.
|
|
303
303
|
|
|
@@ -347,7 +347,7 @@ def upload_content(
|
|
|
347
347
|
skip_excel_ingestion: bool = False,
|
|
348
348
|
ingestion_config: unique_sdk.Content.IngestionConfig | None = None,
|
|
349
349
|
metadata: dict[str, Any] | None = None,
|
|
350
|
-
):
|
|
350
|
+
) -> Content:
|
|
351
351
|
"""
|
|
352
352
|
Uploads content to the knowledge base.
|
|
353
353
|
|
|
@@ -399,7 +399,7 @@ def _trigger_upload_content(
|
|
|
399
399
|
skip_excel_ingestion: bool = False,
|
|
400
400
|
ingestion_config: unique_sdk.Content.IngestionConfig | None = None,
|
|
401
401
|
metadata: dict[str, Any] | None = None,
|
|
402
|
-
):
|
|
402
|
+
) -> Content:
|
|
403
403
|
"""
|
|
404
404
|
Uploads content to the knowledge base.
|
|
405
405
|
|
|
@@ -528,7 +528,7 @@ class ContentService:
|
|
|
528
528
|
skip_excel_ingestion: bool = False,
|
|
529
529
|
ingestion_config: unique_sdk.Content.IngestionConfig | None = None,
|
|
530
530
|
metadata: dict[str, Any] | None = None,
|
|
531
|
-
):
|
|
531
|
+
) -> Content:
|
|
532
532
|
"""
|
|
533
533
|
Uploads content to the knowledge base.
|
|
534
534
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Langchain framework utilities."""
|
|
2
|
+
|
|
3
|
+
try:
|
|
4
|
+
from .client import LangchainNotInstalledError, get_langchain_client
|
|
5
|
+
|
|
6
|
+
__all__ = ["get_langchain_client", "LangchainNotInstalledError"]
|
|
7
|
+
except (ImportError, Exception):
|
|
8
|
+
# If langchain is not installed, don't export anything
|
|
9
|
+
# This handles both ImportError and LangchainNotInstalledError
|
|
10
|
+
__all__ = []
|
|
@@ -30,7 +30,8 @@ def get_openai_client(
|
|
|
30
30
|
"""Get an OpenAI client instance.
|
|
31
31
|
|
|
32
32
|
Args:
|
|
33
|
-
|
|
33
|
+
unique_settings (UniqueSettings | None): Optional UniqueSettings instance
|
|
34
|
+
additional_headers (dict[str, str] | None): Optional additional headers to add to the request
|
|
34
35
|
|
|
35
36
|
Returns:
|
|
36
37
|
OpenAI client instance
|
|
@@ -377,7 +377,6 @@ class KnowledgeBaseService:
|
|
|
377
377
|
mime_type (str): The MIME type of the content.
|
|
378
378
|
scope_id (str | None): The scope ID. Defaults to None.
|
|
379
379
|
skip_ingestion (bool): Whether to skip ingestion. Defaults to False.
|
|
380
|
-
skip_excel_ingestion (bool): Whether to skip excel ingestion. Defaults to False.
|
|
381
380
|
ingestion_config (unique_sdk.Content.IngestionConfig | None): The ingestion configuration. Defaults to None.
|
|
382
381
|
metadata (dict | None): The metadata to associate with the content. Defaults to None.
|
|
383
382
|
|
|
@@ -449,7 +448,7 @@ class KnowledgeBaseService:
|
|
|
449
448
|
skip_excel_ingestion: bool = False,
|
|
450
449
|
ingestion_config: unique_sdk.Content.IngestionConfig | None = None,
|
|
451
450
|
metadata: dict[str, Any] | None = None,
|
|
452
|
-
):
|
|
451
|
+
) -> Content:
|
|
453
452
|
"""
|
|
454
453
|
Uploads content to the knowledge base.
|
|
455
454
|
|
|
@@ -487,14 +486,14 @@ class KnowledgeBaseService:
|
|
|
487
486
|
content_id: str,
|
|
488
487
|
output_dir_path: Path | None = None,
|
|
489
488
|
output_filename: str | None = None,
|
|
490
|
-
):
|
|
489
|
+
) -> Path:
|
|
491
490
|
"""
|
|
492
491
|
Downloads content from a chat and saves it to a file.
|
|
493
492
|
|
|
494
493
|
Args:
|
|
495
494
|
content_id (str): The ID of the content to download.
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
output_filename (str | None): The name of the file to save the content as. If not provided, the original filename will be used. Defaults to None.
|
|
496
|
+
output_dir_path (str | Path | None): The path to the temporary directory where the content will be saved. Defaults to "/tmp".
|
|
498
497
|
|
|
499
498
|
Returns:
|
|
500
499
|
Path: The path to the downloaded file.
|
|
@@ -522,7 +521,6 @@ class KnowledgeBaseService:
|
|
|
522
521
|
|
|
523
522
|
Args:
|
|
524
523
|
content_id (str): The id of the uploaded content.
|
|
525
|
-
chat_id (Optional[str]): The chat_id, defaults to None.
|
|
526
524
|
|
|
527
525
|
Returns:
|
|
528
526
|
bytes: The downloaded content.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_toolkit
|
|
3
|
-
Version: 1.32.
|
|
3
|
+
Version: 1.32.1
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Cedric Klinkert
|
|
@@ -121,6 +121,9 @@ All notable changes to this project will be documented in this file.
|
|
|
121
121
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
122
122
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
123
123
|
|
|
124
|
+
## [1.32.1] - 2025-12-01
|
|
125
|
+
- Added documentation for the toolkit,some missing type hints and doc string fixes.
|
|
126
|
+
|
|
124
127
|
## [1.32.0] - 2025-11-28
|
|
125
128
|
- Add option to filter duplicate sub agent answers.
|
|
126
129
|
|
|
@@ -138,7 +138,7 @@ unique_toolkit/app/webhook.py,sha256=k7DP1UTR3p7D4qzuKPKVmGMAkDVHfALrnMIzTZqj_OI
|
|
|
138
138
|
unique_toolkit/chat/__init__.py,sha256=uP7P6YPeOjEOvpX3bhcU6ND_m0QLr4wMklcrnAKK0q4,804
|
|
139
139
|
unique_toolkit/chat/constants.py,sha256=05kq6zjqUVB2d6_P7s-90nbljpB3ryxwCI-CAz0r2O4,83
|
|
140
140
|
unique_toolkit/chat/deprecated/service.py,sha256=CYwzXi7OB0RjHd73CO2jq8SlpdBmDYLatzPFkb5sA0k,6529
|
|
141
|
-
unique_toolkit/chat/functions.py,sha256=
|
|
141
|
+
unique_toolkit/chat/functions.py,sha256=VdehD26NnsEhBsV5tD0tgUFD4LuEqIYgz8wWSsxYFgA,46078
|
|
142
142
|
unique_toolkit/chat/rendering.py,sha256=c8YiV9oADRrJQ5A_QBJ4_UFc0NZ-2vVaa7tupoMusso,880
|
|
143
143
|
unique_toolkit/chat/responses_api.py,sha256=MCI1MR_4wlo9xY1ifH2daNz4JvjX18uPdryQlemaeLw,14488
|
|
144
144
|
unique_toolkit/chat/schemas.py,sha256=Zh903Xt9PhugvwzoC_k5KXQWAqllWHvj9DmqDVom2yk,6890
|
|
@@ -147,22 +147,23 @@ unique_toolkit/chat/state.py,sha256=Cjgwv_2vhDFbV69xxsn7SefhaoIAEqLx3ferdVFCnOg,
|
|
|
147
147
|
unique_toolkit/chat/utils.py,sha256=ihm-wQykBWhB4liR3LnwPVPt_qGW6ETq21Mw4HY0THE,854
|
|
148
148
|
unique_toolkit/content/__init__.py,sha256=EdJg_A_7loEtCQf4cah3QARQreJx6pdz89Rm96YbMVg,940
|
|
149
149
|
unique_toolkit/content/constants.py,sha256=1iy4Y67xobl5VTnJB6SxSyuoBWbdLl9244xfVMUZi5o,60
|
|
150
|
-
unique_toolkit/content/functions.py,sha256=
|
|
150
|
+
unique_toolkit/content/functions.py,sha256=6QIgPTShF7VF9N55Np5vIlNibbDgPDfJr4-IBaRu6n8,28830
|
|
151
151
|
unique_toolkit/content/schemas.py,sha256=uuS1UsuWK6eC7cP4dTC1q3DJ39xl6zenN2zL4ghFmzk,6424
|
|
152
|
-
unique_toolkit/content/service.py,sha256=
|
|
152
|
+
unique_toolkit/content/service.py,sha256=hwycIbxtLn1p0IgNQMVIxN2NUhy_4AVsTfatytGi-gY,24919
|
|
153
153
|
unique_toolkit/content/smart_rules.py,sha256=z2gHToPrdyj3HqO8Uu-JE5G2ClvJPuhR2XERmmkgoug,9668
|
|
154
154
|
unique_toolkit/content/utils.py,sha256=ITCJHDIXPyFkxR5M-6k-PhHOLbnkVq_RGrGA7i5s1WM,8001
|
|
155
155
|
unique_toolkit/embedding/__init__.py,sha256=uUyzjonPvuDCYsvXCIt7ErQXopLggpzX-MEQd3_e2kE,250
|
|
156
156
|
unique_toolkit/embedding/constants.py,sha256=Lj8-Lcy1FvuC31PM9Exq7vaFuxQV4pEI1huUMFX-J2M,52
|
|
157
157
|
unique_toolkit/embedding/functions.py,sha256=3qp-BfuMAbnp8YB04rh3xH8vsJuCBPizoy-JeaBFtoQ,1944
|
|
158
158
|
unique_toolkit/embedding/schemas.py,sha256=1GvKCaSk4jixzVQ2PKq8yDqwGEVY_hWclYtoAr6CC2g,96
|
|
159
|
-
unique_toolkit/embedding/service.py,sha256=
|
|
159
|
+
unique_toolkit/embedding/service.py,sha256=Ujx4oy7yUsQot8ATyl-3x88LulgruPThEteSArwzuvA,5291
|
|
160
160
|
unique_toolkit/embedding/utils.py,sha256=v86lo__bCJbxZBQ3OcLu5SuwT6NbFfWlcq8iyk6BuzQ,279
|
|
161
161
|
unique_toolkit/framework_utilities/__init__.py,sha256=fvAn9y4MRL1JgoO14ufQtLVRPRHn4jP07XRqt-TItCA,68
|
|
162
|
+
unique_toolkit/framework_utilities/langchain/__init__.py,sha256=CjihxDQqCeSiRpTy1fSRRMYXXKrvhNuChR8nbUlIm84,362
|
|
162
163
|
unique_toolkit/framework_utilities/langchain/client.py,sha256=NxOLnzVMJds2JFMm5ZqTVTz1WMntrmWsLPU4-kwlzqE,2065
|
|
163
164
|
unique_toolkit/framework_utilities/langchain/history.py,sha256=R9RuCeSFNaUO3OZ0G_LmIC4gmOCIANcl91MfyWLnZ1c,650
|
|
164
165
|
unique_toolkit/framework_utilities/openai/__init__.py,sha256=CrHYoC7lv2pBscitLerAFweqy5jh1R671LA_jZQ4lWo,232
|
|
165
|
-
unique_toolkit/framework_utilities/openai/client.py,sha256=
|
|
166
|
+
unique_toolkit/framework_utilities/openai/client.py,sha256=Ft-oLiS6BTaMiuCdObdaMLkiEPE3RYjtc9VPnqQk3W8,2449
|
|
166
167
|
unique_toolkit/framework_utilities/openai/message_builder.py,sha256=RT1pZjxH42TFZlAxQ5zlqdKPvHKVTjc5t3JDUy58I7Q,6887
|
|
167
168
|
unique_toolkit/framework_utilities/utils.py,sha256=JK7g2yMfEx3eMprug26769xqNpS5WJcizf8n2zWMBng,789
|
|
168
169
|
unique_toolkit/language_model/__init__.py,sha256=lRQyLlbwHbNFf4-0foBU13UGb09lwEeodbVsfsSgaCk,1971
|
|
@@ -180,7 +181,7 @@ unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0
|
|
|
180
181
|
unique_toolkit/protocols/support.py,sha256=ZEnbQL5w2-T_1AeM8OHycZJ3qbdfVI1nXe0nL9esQEw,5544
|
|
181
182
|
unique_toolkit/services/__init__.py,sha256=90-IT5FjMcnlqxjp5kme9Fqgp_on46rggctIqHMdqsw,195
|
|
182
183
|
unique_toolkit/services/chat_service.py,sha256=vA97DO4iiXMeTNuwS-bYeskX0DnqO_8vL4yzJAfsGtw,60111
|
|
183
|
-
unique_toolkit/services/knowledge_base.py,sha256=
|
|
184
|
+
unique_toolkit/services/knowledge_base.py,sha256=uc89GL_NZXeFkJKkdHSSh2y1Wx0tmgasWk6uyGi4G_M,36210
|
|
184
185
|
unique_toolkit/short_term_memory/__init__.py,sha256=2mI3AUrffgH7Yt-xS57EGqnHf7jnn6xquoKEhJqk3Wg,185
|
|
185
186
|
unique_toolkit/short_term_memory/constants.py,sha256=698CL6-wjup2MvU19RxSmQk3gX7aqW_OOpZB7sbz_Xg,34
|
|
186
187
|
unique_toolkit/short_term_memory/functions.py,sha256=3WiK-xatY5nh4Dr5zlDUye1k3E6kr41RiscwtTplw5k,4484
|
|
@@ -189,7 +190,7 @@ unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBu
|
|
|
189
190
|
unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
190
191
|
unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
|
|
191
192
|
unique_toolkit/test_utilities/events.py,sha256=_mwV2bs5iLjxS1ynDCjaIq-gjjKhXYCK-iy3dRfvO3g,6410
|
|
192
|
-
unique_toolkit-1.32.
|
|
193
|
-
unique_toolkit-1.32.
|
|
194
|
-
unique_toolkit-1.32.
|
|
195
|
-
unique_toolkit-1.32.
|
|
193
|
+
unique_toolkit-1.32.1.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
|
194
|
+
unique_toolkit-1.32.1.dist-info/METADATA,sha256=ar50wEkaXnpqXhlgJHki4YZIJG6SQFjzXMcfH4w-_W0,45088
|
|
195
|
+
unique_toolkit-1.32.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
196
|
+
unique_toolkit-1.32.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|