unique_sdk 0.10.19__py3-none-any.whl → 0.10.71__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.
Potentially problematic release.
This version of unique_sdk might be problematic. Click here for more details.
- unique_sdk/__init__.py +3 -0
- unique_sdk/api_resources/_agentic_table.py +33 -20
- unique_sdk/api_resources/_content.py +192 -42
- unique_sdk/api_resources/_folder.py +308 -46
- unique_sdk/api_resources/_group.py +429 -0
- unique_sdk/api_resources/_integrated.py +49 -48
- unique_sdk/api_resources/_llm_models.py +64 -0
- unique_sdk/api_resources/_mcp.py +2 -0
- unique_sdk/api_resources/_message.py +96 -3
- unique_sdk/api_resources/_message_execution.py +24 -14
- unique_sdk/api_resources/_message_log.py +46 -19
- unique_sdk/api_resources/_search_string.py +0 -1
- unique_sdk/api_resources/_space.py +387 -8
- unique_sdk/api_resources/_user.py +195 -0
- unique_sdk/utils/chat_in_space.py +30 -28
- unique_sdk/utils/file_io.py +42 -1
- unique_sdk-0.10.71.dist-info/METADATA +389 -0
- {unique_sdk-0.10.19.dist-info → unique_sdk-0.10.71.dist-info}/RECORD +20 -17
- unique_sdk-0.10.19.dist-info/METADATA +0 -1774
- {unique_sdk-0.10.19.dist-info → unique_sdk-0.10.71.dist-info}/LICENSE +0 -0
- {unique_sdk-0.10.19.dist-info → unique_sdk-0.10.71.dist-info}/WHEEL +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import warnings
|
|
2
3
|
from typing import List, Literal
|
|
3
4
|
|
|
4
|
-
from unique_sdk.api_resources._content import Content
|
|
5
5
|
from unique_sdk.api_resources._message import Message
|
|
6
6
|
from unique_sdk.api_resources._space import Space
|
|
7
7
|
from unique_sdk.utils.file_io import upload_file
|
|
8
|
+
from unique_sdk.utils.file_io import (
|
|
9
|
+
wait_for_ingestion_completion as _wait_for_ingestion_completion,
|
|
10
|
+
)
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
async def send_message_and_wait_for_completion(
|
|
@@ -12,9 +15,9 @@ async def send_message_and_wait_for_completion(
|
|
|
12
15
|
company_id: str,
|
|
13
16
|
assistant_id: str,
|
|
14
17
|
text: str,
|
|
15
|
-
tool_choices: List[str] = None,
|
|
18
|
+
tool_choices: List[str] | None = None,
|
|
16
19
|
scope_rules: dict | None = None,
|
|
17
|
-
chat_id: str = None,
|
|
20
|
+
chat_id: str | None = None,
|
|
18
21
|
poll_interval: float = 1.0,
|
|
19
22
|
max_wait: float = 60.0,
|
|
20
23
|
stop_condition: Literal["stoppedStreamingAt", "completedAt"] = "stoppedStreamingAt",
|
|
@@ -49,10 +52,10 @@ async def send_message_and_wait_for_completion(
|
|
|
49
52
|
|
|
50
53
|
max_attempts = int(max_wait // poll_interval)
|
|
51
54
|
for _ in range(max_attempts):
|
|
52
|
-
answer = Space.
|
|
55
|
+
answer = await Space.get_latest_message_async(user_id, company_id, chat_id)
|
|
53
56
|
if answer.get(stop_condition) is not None:
|
|
54
57
|
try:
|
|
55
|
-
user_message = Message.
|
|
58
|
+
user_message = await Message.retrieve_async(
|
|
56
59
|
user_id, company_id, message_id, chatId=chat_id
|
|
57
60
|
)
|
|
58
61
|
debug_info = user_message.get("debugInfo")
|
|
@@ -76,6 +79,7 @@ async def chat_against_file(
|
|
|
76
79
|
text: str,
|
|
77
80
|
poll_interval: float = 1.0,
|
|
78
81
|
max_wait: float = 60.0,
|
|
82
|
+
should_delete_chat: bool = True,
|
|
79
83
|
) -> "Space.Message":
|
|
80
84
|
"""
|
|
81
85
|
Chat against a file by uploading it, sending a message and waiting for a reply.
|
|
@@ -115,7 +119,7 @@ async def chat_against_file(
|
|
|
115
119
|
)
|
|
116
120
|
content_id = upload_response.get("id")
|
|
117
121
|
|
|
118
|
-
await
|
|
122
|
+
await _wait_for_ingestion_completion(
|
|
119
123
|
user_id=user_id,
|
|
120
124
|
company_id=company_id,
|
|
121
125
|
content_id=content_id,
|
|
@@ -140,8 +144,8 @@ async def chat_against_file(
|
|
|
140
144
|
print(f"Error during chat against file: {err}")
|
|
141
145
|
raise
|
|
142
146
|
finally:
|
|
143
|
-
if chat_id:
|
|
144
|
-
Space.
|
|
147
|
+
if chat_id and should_delete_chat:
|
|
148
|
+
await Space.delete_chat_async(
|
|
145
149
|
user_id=user_id,
|
|
146
150
|
company_id=company_id,
|
|
147
151
|
chat_id=chat_id,
|
|
@@ -152,29 +156,27 @@ async def wait_for_ingestion_completion(
|
|
|
152
156
|
user_id: str,
|
|
153
157
|
company_id: str,
|
|
154
158
|
content_id: str,
|
|
155
|
-
chat_id: str = None,
|
|
159
|
+
chat_id: str | None = None,
|
|
156
160
|
poll_interval: float = 1.0,
|
|
157
161
|
max_wait: float = 60.0,
|
|
158
162
|
):
|
|
159
163
|
"""
|
|
160
164
|
Polls until the content ingestion is finished or the maximum wait time is reached and throws in case ingestion fails. The function assumes that the content exists.
|
|
165
|
+
|
|
166
|
+
.. deprecated::
|
|
167
|
+
Use :func:`unique_sdk.utils.file_io.wait_for_ingestion_completion` instead.
|
|
161
168
|
"""
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"FAILED"
|
|
177
|
-
):
|
|
178
|
-
raise RuntimeError(f"Ingestion failed with state: {ingestion_state}")
|
|
179
|
-
await asyncio.sleep(poll_interval)
|
|
180
|
-
raise TimeoutError("Timed out waiting for file ingestion to finish.")
|
|
169
|
+
warnings.warn(
|
|
170
|
+
"unique_sdk.utils.chat_in_space.wait_for_ingestion_completion is deprecated. "
|
|
171
|
+
"Use unique_sdk.utils.file_io.wait_for_ingestion_completion instead.",
|
|
172
|
+
DeprecationWarning,
|
|
173
|
+
stacklevel=2,
|
|
174
|
+
)
|
|
175
|
+
return await _wait_for_ingestion_completion(
|
|
176
|
+
user_id=user_id,
|
|
177
|
+
company_id=company_id,
|
|
178
|
+
content_id=content_id,
|
|
179
|
+
chat_id=chat_id,
|
|
180
|
+
poll_interval=poll_interval,
|
|
181
|
+
max_wait=max_wait,
|
|
182
|
+
)
|
unique_sdk/utils/file_io.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
import os
|
|
2
3
|
import tempfile
|
|
3
4
|
from pathlib import Path
|
|
@@ -38,6 +39,7 @@ def upload_file(
|
|
|
38
39
|
path_to_file,
|
|
39
40
|
displayed_filename,
|
|
40
41
|
mime_type,
|
|
42
|
+
description: Optional[str] = None,
|
|
41
43
|
scope_or_unique_path=None,
|
|
42
44
|
chat_id=None,
|
|
43
45
|
ingestion_config: Optional[Content.IngestionConfig] = None,
|
|
@@ -55,6 +57,7 @@ def upload_file(
|
|
|
55
57
|
"key": displayed_filename,
|
|
56
58
|
"title": displayed_filename,
|
|
57
59
|
"mimeType": mime_type,
|
|
60
|
+
"description": description,
|
|
58
61
|
"ingestionConfig": ingestion_config,
|
|
59
62
|
"metadata": metadata,
|
|
60
63
|
},
|
|
@@ -83,6 +86,7 @@ def upload_file(
|
|
|
83
86
|
"key": displayed_filename,
|
|
84
87
|
"title": displayed_filename,
|
|
85
88
|
"mimeType": mime_type,
|
|
89
|
+
"description": description,
|
|
86
90
|
"byteSize": size,
|
|
87
91
|
"ingestionConfig": ingestion_config,
|
|
88
92
|
"metadata": metadata,
|
|
@@ -98,6 +102,7 @@ def upload_file(
|
|
|
98
102
|
"key": displayed_filename,
|
|
99
103
|
"title": displayed_filename,
|
|
100
104
|
"mimeType": mime_type,
|
|
105
|
+
"description": description,
|
|
101
106
|
"byteSize": size,
|
|
102
107
|
"ingestionConfig": ingestion_config,
|
|
103
108
|
"metadata": metadata,
|
|
@@ -110,7 +115,11 @@ def upload_file(
|
|
|
110
115
|
|
|
111
116
|
|
|
112
117
|
def download_content(
|
|
113
|
-
companyId: str,
|
|
118
|
+
companyId: str,
|
|
119
|
+
userId: str,
|
|
120
|
+
content_id: str,
|
|
121
|
+
filename: str,
|
|
122
|
+
chat_id: str | None = None,
|
|
114
123
|
):
|
|
115
124
|
# Ensure the URL is a valid string
|
|
116
125
|
if not isinstance(content_id, str):
|
|
@@ -143,3 +152,35 @@ def download_content(
|
|
|
143
152
|
raise Exception(f"Error downloading file: Status code {response.status_code}")
|
|
144
153
|
|
|
145
154
|
return file_path
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
async def wait_for_ingestion_completion(
|
|
158
|
+
user_id: str,
|
|
159
|
+
company_id: str,
|
|
160
|
+
content_id: str,
|
|
161
|
+
chat_id: str | None = None,
|
|
162
|
+
poll_interval: float = 1.0,
|
|
163
|
+
max_wait: float = 60.0,
|
|
164
|
+
):
|
|
165
|
+
"""
|
|
166
|
+
Polls until the content ingestion is finished or the maximum wait time is reached and throws in case ingestion fails. The function assumes that the content exists.
|
|
167
|
+
"""
|
|
168
|
+
max_attempts = int(max_wait // poll_interval)
|
|
169
|
+
for _ in range(max_attempts):
|
|
170
|
+
searched_content = Content.search(
|
|
171
|
+
user_id=user_id,
|
|
172
|
+
company_id=company_id,
|
|
173
|
+
where={"id": {"equals": content_id}},
|
|
174
|
+
chatId=chat_id,
|
|
175
|
+
includeFailedContent=True,
|
|
176
|
+
)
|
|
177
|
+
if searched_content:
|
|
178
|
+
ingestion_state = searched_content[0].get("ingestionState")
|
|
179
|
+
if ingestion_state == "FINISHED":
|
|
180
|
+
return ingestion_state
|
|
181
|
+
if isinstance(ingestion_state, str) and ingestion_state.startswith(
|
|
182
|
+
"FAILED"
|
|
183
|
+
):
|
|
184
|
+
raise RuntimeError(f"Ingestion failed with state: {ingestion_state}")
|
|
185
|
+
await asyncio.sleep(poll_interval)
|
|
186
|
+
raise TimeoutError("Timed out waiting for file ingestion to finish.")
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: unique_sdk
|
|
3
|
+
Version: 0.10.71
|
|
4
|
+
Summary:
|
|
5
|
+
License: MIT
|
|
6
|
+
Author: Martin Fadler
|
|
7
|
+
Author-email: martin.fadler@unique.ch
|
|
8
|
+
Requires-Python: >=3.11,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Provides-Extra: openai
|
|
14
|
+
Requires-Dist: aiohttp (>=3.9.0,<4.0.0)
|
|
15
|
+
Requires-Dist: anyio (>=4.0.0,<5.0.0)
|
|
16
|
+
Requires-Dist: httpx (>=0.28.0,<0.29.0)
|
|
17
|
+
Requires-Dist: openai (>=1.105.0,<2.0.0) ; extra == "openai"
|
|
18
|
+
Requires-Dist: regex (>=2024.5.15,<2025.0.0)
|
|
19
|
+
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
20
|
+
Requires-Dist: tiktoken (>=0.12.0,<0.13.0)
|
|
21
|
+
Requires-Dist: typing-extensions (>=4.9.0,<5.0.0)
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# Unique Python SDK
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Visit: [https://unique-ag.github.io/](https://unique-ag.github.io/ai/unique-sdk/) for the documentation.
|
|
28
|
+
|
|
29
|
+
# Changelog
|
|
30
|
+
|
|
31
|
+
All notable changes to this project will be documented in this file.
|
|
32
|
+
|
|
33
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
34
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
35
|
+
|
|
36
|
+
## [0.10.71] - 2026-01-16
|
|
37
|
+
- Add local CI testing commands via poethepoet (poe lint, poe test, poe ci-typecheck, etc.)
|
|
38
|
+
|
|
39
|
+
## [0.10.70] - 2026-01-13
|
|
40
|
+
- Adding additional parameters `isQueueable`, `executionOptions` and `progressTitle` to the message execution
|
|
41
|
+
|
|
42
|
+
## [0.10.69] - 2026-01-16
|
|
43
|
+
- Add unified type checking CI with basedpyright
|
|
44
|
+
|
|
45
|
+
## [0.10.68] - 2026-01-13
|
|
46
|
+
- Add missing direct dependencies (httpx, anyio, aiohttp, regex, tiktoken) for deptry compliance
|
|
47
|
+
|
|
48
|
+
## [0.10.67] - 2026-01-14
|
|
49
|
+
- chore(deps): bump requests from 2.31.0 to 2.32.4 in examples/custom-assistant
|
|
50
|
+
|
|
51
|
+
## [0.10.66] - 2026-01-05
|
|
52
|
+
- Expose appliedIngestionConfig field on content search.
|
|
53
|
+
|
|
54
|
+
## [0.10.65] - 2025-01-05
|
|
55
|
+
- Add new params for elicitation to `call_tool` api
|
|
56
|
+
|
|
57
|
+
## [0.10.64] - 2025-12-31
|
|
58
|
+
- Add create path functionality to theupsert function and allow getinfo(s) to query by parentfolderpath.
|
|
59
|
+
|
|
60
|
+
## [0.10.63] - 2025-12-23
|
|
61
|
+
- Add functions to create a space and manage its access.
|
|
62
|
+
|
|
63
|
+
## [0.10.62] - 2025-12-23
|
|
64
|
+
- Add get user groups function and allow the get users function to filter by username.
|
|
65
|
+
|
|
66
|
+
## [0.10.61] - 2025-12-22
|
|
67
|
+
- Add `displayInChat` field to ingestion config, allowing silent uploads to chat.
|
|
68
|
+
|
|
69
|
+
## [0.10.60] - 2025-12-19
|
|
70
|
+
- Expose startedStreamingAt and gptRequest fields
|
|
71
|
+
|
|
72
|
+
## [0.10.59] - 2025-12-19
|
|
73
|
+
- Add context field to MagicTableSheetIngestParams.
|
|
74
|
+
- Add rowMetadata and context fields to MagicTableRow.
|
|
75
|
+
|
|
76
|
+
## [0.10.58] - 2025-12-16
|
|
77
|
+
- chore(deps): Bump urllib3 from 2.5.0 to 2.6.2
|
|
78
|
+
|
|
79
|
+
## [0.10.57] - 2025-12-06
|
|
80
|
+
- Add description field on create chat completions params.
|
|
81
|
+
|
|
82
|
+
## [0.10.56] - 2025-12-05
|
|
83
|
+
- Add description field on create chat completions params.
|
|
84
|
+
|
|
85
|
+
## [0.10.55] - 2025-12-04
|
|
86
|
+
- Allow configuring inherit access on folder creation.
|
|
87
|
+
|
|
88
|
+
## [0.10.54] - 2025-12-02
|
|
89
|
+
- Add types for Agentic Table api methods.
|
|
90
|
+
|
|
91
|
+
## [0.10.53] - 2025-12-01
|
|
92
|
+
- Improve OpenAI Proxy docs https://unique-ag.github.io/ai/unique-sdk/
|
|
93
|
+
|
|
94
|
+
## [0.10.52] - 2025-11-21
|
|
95
|
+
- Centralized docs to https://unique-ag.github.io/ai/unique-sdk/
|
|
96
|
+
|
|
97
|
+
## [0.10.51] - 2025-11-21
|
|
98
|
+
- Add function to get a space.
|
|
99
|
+
|
|
100
|
+
## [0.10.50] - 2025-11-21
|
|
101
|
+
- Allow updating the configuration of a user and group.
|
|
102
|
+
|
|
103
|
+
## [0.10.49] - 2025-11-21
|
|
104
|
+
- Add get folder by scope id function
|
|
105
|
+
|
|
106
|
+
## [0.10.48] - 2025-11-20
|
|
107
|
+
- Update Agentic Table LogDetail and LogEntry types.
|
|
108
|
+
|
|
109
|
+
## [0.10.47] - 2025-11-19
|
|
110
|
+
- Add expired/s at fields on content search result.
|
|
111
|
+
|
|
112
|
+
## [0.10.46] - 2025-11-18
|
|
113
|
+
- chat_against_file function allows now a should_delete_chat flag.
|
|
114
|
+
|
|
115
|
+
## [0.10.45] - 2025-11-18
|
|
116
|
+
- Create group and manage users functions.
|
|
117
|
+
|
|
118
|
+
## [0.10.44] - 2025-11-18
|
|
119
|
+
- add function to get all messages in a chat.
|
|
120
|
+
|
|
121
|
+
## [0.10.43] - 2025-11-14
|
|
122
|
+
- Add get, delete and update groups functions.
|
|
123
|
+
|
|
124
|
+
## [0.10.42] - 2025-11-14
|
|
125
|
+
- Add get_users function.
|
|
126
|
+
|
|
127
|
+
## [0.10.41] - 2025-11-13
|
|
128
|
+
- Add create_message and get_latest_message.
|
|
129
|
+
|
|
130
|
+
## [0.10.40] - 2025-11-10
|
|
131
|
+
- Don't send description if not defined.
|
|
132
|
+
|
|
133
|
+
## [0.10.39] - 2025-11-07
|
|
134
|
+
- Add function to get llm models
|
|
135
|
+
|
|
136
|
+
## [0.10.38] - 2025-11-06
|
|
137
|
+
- Add description property to Reference and Content.
|
|
138
|
+
|
|
139
|
+
## [0.10.37] - 2025-11-04
|
|
140
|
+
- Introduce local integration tests for Content API Resource
|
|
141
|
+
|
|
142
|
+
## [0.10.36] - 2025-11-04
|
|
143
|
+
- Introduce local integration tests for Folder API Resource
|
|
144
|
+
|
|
145
|
+
## [0.10.35] - 2025-11-04
|
|
146
|
+
- Inmprove folder get infos types.
|
|
147
|
+
|
|
148
|
+
## [0.10.34] - 2025-10-29
|
|
149
|
+
- Add documentation for agentic table.
|
|
150
|
+
|
|
151
|
+
## [0.10.33] - 2025-10-27
|
|
152
|
+
- Improve messagelog and message execution types.
|
|
153
|
+
|
|
154
|
+
## [0.10.32] - 2025-10-14
|
|
155
|
+
- Add function to stream to chat frontend.
|
|
156
|
+
|
|
157
|
+
## [0.10.31] - 2025-10-13
|
|
158
|
+
- Add readme for message log and execution.
|
|
159
|
+
|
|
160
|
+
## [0.10.30] - 2025-10-07
|
|
161
|
+
- Improve types for content get infos.
|
|
162
|
+
|
|
163
|
+
## [0.10.29] - 2025-10-06
|
|
164
|
+
- Switch default model used from `GPT-3.5-turbo (0125)` to `GPT-4o (1120)`
|
|
165
|
+
|
|
166
|
+
## [0.10.28] - 2025-10-03
|
|
167
|
+
- Use non blocking versions of `Space.get_latest_message` and `Message.retrieve` in `send_message_and_wait_for_completion`.
|
|
168
|
+
|
|
169
|
+
## [0.10.27] - 2025-09-24
|
|
170
|
+
- Improve readme to use Unique AI.
|
|
171
|
+
|
|
172
|
+
## [0.10.26] - 2025-09-22
|
|
173
|
+
- Improve typing.
|
|
174
|
+
|
|
175
|
+
## [0.10.25] - 2025-09-18
|
|
176
|
+
- Add support for udpate and delete files by file or folder path.
|
|
177
|
+
|
|
178
|
+
## [0.10.24] - 2025-09-17
|
|
179
|
+
- Add function to update a folder.
|
|
180
|
+
|
|
181
|
+
## [0.10.23] - 2025-09-12
|
|
182
|
+
- Revert to using default reasoning effort.
|
|
183
|
+
|
|
184
|
+
## [0.10.22] - 2025-09-12
|
|
185
|
+
- Add support for metadata update of a file.
|
|
186
|
+
|
|
187
|
+
## [0.10.21] - 2025-09-04
|
|
188
|
+
- Update Chat Completions API types and add support for reasoning effort.
|
|
189
|
+
|
|
190
|
+
## [0.10.20] - 2025-09-04
|
|
191
|
+
- Update Responses API types
|
|
192
|
+
|
|
193
|
+
## [0.10.19] - 2025-09-02
|
|
194
|
+
- Improve `send_message_and_wait_for_completion`:
|
|
195
|
+
- Add option to select stop_condition `["stoppedStreamingAt", "completedAt"]`.
|
|
196
|
+
- Load `debugInfo` from `last_user_message` for better developer experience.
|
|
197
|
+
|
|
198
|
+
## [0.10.18] - 2025-09-02
|
|
199
|
+
- Temporarily remove support for update and delete files by filePath.
|
|
200
|
+
|
|
201
|
+
## [0.10.17] - 2025-09-01
|
|
202
|
+
- Add function to update a file
|
|
203
|
+
|
|
204
|
+
## [0.10.16] - 2025-08-31
|
|
205
|
+
- Add function to delete a content.
|
|
206
|
+
|
|
207
|
+
## [0.10.15] - 2025-08-28
|
|
208
|
+
- Add default values for message log types
|
|
209
|
+
|
|
210
|
+
## [0.10.14] - 2025-08-28
|
|
211
|
+
- Add function to delete folders and files recursively
|
|
212
|
+
|
|
213
|
+
## [0.10.13] - 2025-08-24
|
|
214
|
+
- Add functions to create, get and update a message eecution and create and update a message log.
|
|
215
|
+
|
|
216
|
+
## [0.10.12] - 2025-08-24
|
|
217
|
+
- Switch to using Content get info deprecated endpoint to make sure we support older release versions.
|
|
218
|
+
|
|
219
|
+
## [0.10.11] - 2025-08-24
|
|
220
|
+
- Enforce usage of ruff using pipeline
|
|
221
|
+
|
|
222
|
+
## [0.10.10] - 2025-08-18
|
|
223
|
+
- Fix wrong name of references in `Space.Message`.
|
|
224
|
+
- Fix wrong name of assessment in `Space.Message`.
|
|
225
|
+
- Remove default values for `text`, `originalText` and `debugInfo` in `Space.Message` as these don't have an effect.
|
|
226
|
+
|
|
227
|
+
## [0.10.9] - 2025-08-15
|
|
228
|
+
- Add script to wait for content ingestion finished.
|
|
229
|
+
|
|
230
|
+
## [0.10.8] - 2025-08-13
|
|
231
|
+
- Add support for Agentic Table.
|
|
232
|
+
|
|
233
|
+
## [0.10.7] - 2025-08-13
|
|
234
|
+
- Make metadata optional when uploading a file.
|
|
235
|
+
|
|
236
|
+
## [0.10.6] - 2025-08-06
|
|
237
|
+
- Make tools optional for running an agent.
|
|
238
|
+
|
|
239
|
+
## [0.10.5] - 2025-08-06
|
|
240
|
+
- Get paginated files and folders info.
|
|
241
|
+
|
|
242
|
+
## [0.10.4] - 2025-08-05
|
|
243
|
+
- Add support for reasoning API with streaming within a chat.
|
|
244
|
+
|
|
245
|
+
## [0.10.3] - 2025-08-05
|
|
246
|
+
- Expose scoreThreshold param for search.
|
|
247
|
+
|
|
248
|
+
## [0.10.2] - 2025-08-05
|
|
249
|
+
- Add script to chat against file.
|
|
250
|
+
|
|
251
|
+
## [0.10.1] - 2025-08-05
|
|
252
|
+
- Allow deletion of a space chat.
|
|
253
|
+
|
|
254
|
+
## [0.10.0] - 2025-08-04
|
|
255
|
+
- Add MCP support
|
|
256
|
+
|
|
257
|
+
## [0.9.42] - 2025-07-31
|
|
258
|
+
- Fix wrong chat in space example.
|
|
259
|
+
|
|
260
|
+
## [0.9.41] - 2025-07-31
|
|
261
|
+
- Fix double-slash error in open ai proxy script.
|
|
262
|
+
|
|
263
|
+
## [0.9.40] - 2025-07-22
|
|
264
|
+
- Fixed bug where get requests send body with the request. This is not allowed by WAF policies.
|
|
265
|
+
|
|
266
|
+
## [0.9.39] - 2025-07-18
|
|
267
|
+
- Add script to chat in a space.
|
|
268
|
+
|
|
269
|
+
## [0.9.38] - 2025-07-18
|
|
270
|
+
- [Experimental] Add support for Unique OpenAI proxy. You can now use the OpenAI SDK directly through Unique. Checkout how to do this and a few examples here: `tutorials/unique_basics/sdk_examples/openai_scripts.py`.
|
|
271
|
+
|
|
272
|
+
## [0.9.37] - 2025-07-10
|
|
273
|
+
- Add `sheetName` property to the `MagicTableSheetIngestParams` object used by function that ingests magic table sheets.
|
|
274
|
+
|
|
275
|
+
## [0.9.36] - 2025-06-23
|
|
276
|
+
- Allow passing a user id when creating chat completions. This is optional and it does not impact the current behaviour.
|
|
277
|
+
|
|
278
|
+
## [0.9.35] - 2025-06-18
|
|
279
|
+
- Allow scope access updates (add/remove) on folder based on scope id or path.
|
|
280
|
+
|
|
281
|
+
## [0.9.34] - 2025-06-17
|
|
282
|
+
- Allow ingestion config updates on folder based on scope id or path.
|
|
283
|
+
|
|
284
|
+
## [0.9.33] - 2025-06-11
|
|
285
|
+
- Add function to get a folder by id or by path.
|
|
286
|
+
|
|
287
|
+
## [0.9.32] - 2025-06-11
|
|
288
|
+
- Add function to ingest magic table sheets.
|
|
289
|
+
|
|
290
|
+
## [0.9.31] - 2025-05-21
|
|
291
|
+
- Add function to update folder access (add or remove).
|
|
292
|
+
|
|
293
|
+
## [0.9.30] - 2025-05-21
|
|
294
|
+
- Add function to update folder ingestion config.
|
|
295
|
+
|
|
296
|
+
## [0.9.29] - 2025-05-20
|
|
297
|
+
- Add function to create folder paths if they do not exist.
|
|
298
|
+
|
|
299
|
+
## [0.9.28] - 2025-05-20
|
|
300
|
+
- Add function to search content info. This also allows filtering content info by metadata info.
|
|
301
|
+
|
|
302
|
+
## [0.9.27] - 2025-05-14
|
|
303
|
+
- Add the possibility to specify metadata when creating or updating a Content.
|
|
304
|
+
|
|
305
|
+
## [0.9.26] - 2025-05-13
|
|
306
|
+
- Add the possibility to specify ingestionConfig when creating or updating a Content.
|
|
307
|
+
|
|
308
|
+
## [0.9.25] - 2025-05-02
|
|
309
|
+
- Fixed typos in `README.md`, including incorrect `sdk.utils` imports and code example errors.
|
|
310
|
+
|
|
311
|
+
## [0.9.24] - 2025-04-23
|
|
312
|
+
- Make `chatId` property in `Search.CreateParams` optional
|
|
313
|
+
|
|
314
|
+
## [0.9.23] - 2025-03-25
|
|
315
|
+
- Define programming language classifier explicitly for python 3.11
|
|
316
|
+
|
|
317
|
+
## [0.9.22] - 2025-02-25
|
|
318
|
+
- update the retry_on_error to only `APIError` and `APIConnectionError` update the `resp["error"]` to be `resp.get("error")` to avoid key error
|
|
319
|
+
|
|
320
|
+
## [0.9.21] - 2025-02-21
|
|
321
|
+
- Add title parameter and change labels in `MessageAssessment`
|
|
322
|
+
|
|
323
|
+
## [0.9.20] - 2025-02-01
|
|
324
|
+
- Add url parameter to `MessageAssessment.create_async` and `MessageAssessment.modify_async`
|
|
325
|
+
|
|
326
|
+
## [0.9.19] - 2025-01-31
|
|
327
|
+
- Add `MessageAssessment` resource
|
|
328
|
+
|
|
329
|
+
## [0.9.18] - 2025-01-22
|
|
330
|
+
- Removed `Invalid response body from API` from `retry_dict` as it's our own artificail error.
|
|
331
|
+
|
|
332
|
+
## [0.9.17] - 2025-01-03
|
|
333
|
+
- BREAKING CHANGE!! Removed unused `id` from `ShortTermMemory` create and find methods.
|
|
334
|
+
|
|
335
|
+
## [0.9.16] - 2024-12-19
|
|
336
|
+
- Corrected return type of `Search.create` and `Search.create_async` to `List[Search]`
|
|
337
|
+
- Retry on `Connection aborted` error
|
|
338
|
+
|
|
339
|
+
## [0.9.15] - 2024-12-06
|
|
340
|
+
- Add `Internal server error` and `You can retry your request` to the retry logic
|
|
341
|
+
|
|
342
|
+
## [0.9.14] - 2024-12-06
|
|
343
|
+
- Add `contentIds` to `Search.create` and `Search.create_async`
|
|
344
|
+
|
|
345
|
+
## [0.9.13] - 2024-10-23
|
|
346
|
+
- Add retry for `5xx` errors, add additional error message.
|
|
347
|
+
|
|
348
|
+
## [0.9.12] - 2024-11-21
|
|
349
|
+
- Include original error message in returned exceptions
|
|
350
|
+
|
|
351
|
+
## [0.9.11] - 2024-11-18
|
|
352
|
+
- Add `ingestionConfig` to `UpsertParams.Input` parameters
|
|
353
|
+
|
|
354
|
+
## [0.9.10] - 2024-10-23
|
|
355
|
+
- Remove `temperature` parameter from `Integrated.chat_stream_completion`, `Integrated.chat_stream_completion_async`, `ChatCompletion.create` and `ChatCompletion.create_async` methods. To use `temperature` parameter, set the attribute in `options` parameter instead.
|
|
356
|
+
|
|
357
|
+
## [0.9.9] - 2024-10-23
|
|
358
|
+
- Revert deletion of `Message.retrieve` method
|
|
359
|
+
|
|
360
|
+
## [0.9.8] - 2024-10-16
|
|
361
|
+
- Add `retries` for `_static_request` and `_static_request_async` in `APIResource` - When the error messages contains either `"problem proxying the request"`,
|
|
362
|
+
or `"Upstream service reached a hard timeout"`,
|
|
363
|
+
## [0.9.7] - 2024-09-23
|
|
364
|
+
- Add `completedAt` to `CreateParams` of `Message`
|
|
365
|
+
|
|
366
|
+
## [0.9.6] - 2024-09-03
|
|
367
|
+
- Added `metaDataFilter` to `Search` parameters.
|
|
368
|
+
|
|
369
|
+
## [0.9.5] - 2024-08-07
|
|
370
|
+
- Add `completedAt` to `ModifyParams`
|
|
371
|
+
|
|
372
|
+
## [0.9.4] - 2024-07-31
|
|
373
|
+
- Add `close` and `close_async` to `http_client`
|
|
374
|
+
- Make `httpx` the default client for async requests
|
|
375
|
+
|
|
376
|
+
## [0.9.3] - 2024-07-31
|
|
377
|
+
- `Search.create`, `Message`, `ChatCompletion` parameters that were marked `NotRequired` are now also `Optional`
|
|
378
|
+
|
|
379
|
+
## [0.9.2] - 2024-07-30
|
|
380
|
+
- Bug fix in `Search.create`: langugage -> language
|
|
381
|
+
|
|
382
|
+
## [0.9.1] - 2024-07-30
|
|
383
|
+
- Added parameters to `Search.create` and `Search.create_async`
|
|
384
|
+
- `language` for full text search
|
|
385
|
+
- `reranker` to reranker search results
|
|
386
|
+
|
|
387
|
+
## [0.9.0] - 2024-07-29
|
|
388
|
+
- Added the possibility to make async requests to the unique APIs using either aiohttp or httpx as client
|
|
389
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
unique_sdk/__init__.py,sha256=
|
|
1
|
+
unique_sdk/__init__.py,sha256=yfrzJ2M36Ota9-eohCxD-rmvfthh_eI3E3Jz_DPqiqs,4204
|
|
2
2
|
unique_sdk/_api_requestor.py,sha256=i4gCpzx8zP95sv-AhJfpQxKvWR0U-I6lclHyV55RPtg,14397
|
|
3
3
|
unique_sdk/_api_resource.py,sha256=ytjomI-IVJwsbvdPyuZCfF-bl-Abgf66bu1D34YxCu8,6244
|
|
4
4
|
unique_sdk/_api_version.py,sha256=Ku4JPdeyJtnX5eJJvRCEc1_u44UObdVrvrL1T-WwWCs,46
|
|
@@ -15,28 +15,31 @@ unique_sdk/_version.py,sha256=j4_tPC6t3enRds7LqiRuWSyfrYHfEo6CXIDARAWW98I,19
|
|
|
15
15
|
unique_sdk/_webhook.py,sha256=GYxbUibQN_W4XlNTHaMIksT9FQJk4LJmlKcxOu3jqiU,2855
|
|
16
16
|
unique_sdk/api_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
unique_sdk/api_resources/_acronyms.py,sha256=GIU1XH1flGWQYcpsFqTYwg4ioIGxVmb15tux84nmhEg,891
|
|
18
|
-
unique_sdk/api_resources/_agentic_table.py,sha256=
|
|
18
|
+
unique_sdk/api_resources/_agentic_table.py,sha256=omdF4vbGCsjuQpPhuMUwaaGAb9nXscEUZsqUz3cz2AY,10353
|
|
19
19
|
unique_sdk/api_resources/_chat_completion.py,sha256=ILCAffxkbkfh2iV9L4KKnfe80gZmT9pWfkNmf3mq68U,2172
|
|
20
|
-
unique_sdk/api_resources/_content.py,sha256=
|
|
20
|
+
unique_sdk/api_resources/_content.py,sha256=UNHsEIOyNVx5VFtv7n4MeXBxSyAW53vagUHMA5_Udec,19849
|
|
21
21
|
unique_sdk/api_resources/_embedding.py,sha256=C6qak7cCUBMBINfPhgH8taCJZ9n6w1MUElqDJJ8dG10,1281
|
|
22
22
|
unique_sdk/api_resources/_event.py,sha256=bpWF9vstdoAWbUzr-iiGP713ceP0zPk77GJXiImf9zg,374
|
|
23
|
-
unique_sdk/api_resources/_folder.py,sha256=
|
|
24
|
-
unique_sdk/api_resources/
|
|
25
|
-
unique_sdk/api_resources/
|
|
26
|
-
unique_sdk/api_resources/
|
|
23
|
+
unique_sdk/api_resources/_folder.py,sha256=h7f1NhTlC-pW9uAEMFw78vTpim_ctvRGB5rzcc-L87E,21553
|
|
24
|
+
unique_sdk/api_resources/_group.py,sha256=8A8mSjhWuhFxBA2r_z7q-70miJ_ugz7NAffVwbPu1oo,10302
|
|
25
|
+
unique_sdk/api_resources/_integrated.py,sha256=TxEKSYQZjZezBUk6kUgLvCgqgZXvgZR2IqHLieapKwQ,6204
|
|
26
|
+
unique_sdk/api_resources/_llm_models.py,sha256=3Jn6MpxWgZ43Hze8JHd4_n27si5xmwd3JE8r8cEZq_M,1640
|
|
27
|
+
unique_sdk/api_resources/_mcp.py,sha256=_kWSn4Awvd7vtopbYM3YKhV5-Xrz5h_LBlahmWlKx3U,3384
|
|
28
|
+
unique_sdk/api_resources/_message.py,sha256=wqPH3FdzutHLQXFErAzQYOddoeeE4jEBJr7yrPFYEHo,10986
|
|
27
29
|
unique_sdk/api_resources/_message_assessment.py,sha256=SSfx6eW7zb_GKe8cFJzCqW-t-_eWEXxKP5cnIb0DhIc,2276
|
|
28
|
-
unique_sdk/api_resources/_message_execution.py,sha256=
|
|
29
|
-
unique_sdk/api_resources/_message_log.py,sha256=
|
|
30
|
+
unique_sdk/api_resources/_message_execution.py,sha256=B7gMisim5iJa8zzDRplIPAULrUd56S64GOltOV7z0sc,4833
|
|
31
|
+
unique_sdk/api_resources/_message_log.py,sha256=_DifZ4Di7uKyzkP0i8rwu5IIiYZPCBp5lvE4gfTrTHw,4793
|
|
30
32
|
unique_sdk/api_resources/_search.py,sha256=GQItZKoGNOVZfkLLltBmsRZYBIreRKU0lGW8Kgpj1_Q,1959
|
|
31
|
-
unique_sdk/api_resources/_search_string.py,sha256=
|
|
33
|
+
unique_sdk/api_resources/_search_string.py,sha256=LZz2_QPZXV1NXucRR06dnDC2miK7J8XBY7dXX2xoDY4,1610
|
|
32
34
|
unique_sdk/api_resources/_short_term_memory.py,sha256=vPRN-Y0WPx74E6y-A3LocGc0TxJdzT-xGL66WzZwKRg,2820
|
|
33
|
-
unique_sdk/api_resources/_space.py,sha256=
|
|
35
|
+
unique_sdk/api_resources/_space.py,sha256=bIeR2IOba2Nzzz4HP15dDEXe50mx7gh9GfatDxwNGXo,14598
|
|
36
|
+
unique_sdk/api_resources/_user.py,sha256=XGlE3SDtv-0qs9boT-ts6F2Cxq8RXAT5OCrvY5nOCx8,4677
|
|
34
37
|
unique_sdk/utils/chat_history.py,sha256=5UqL9hF1O9pV7skbNOlEibF5rHdYsmG3m5-YEPUowOs,3037
|
|
35
|
-
unique_sdk/utils/chat_in_space.py,sha256=
|
|
36
|
-
unique_sdk/utils/file_io.py,sha256=
|
|
38
|
+
unique_sdk/utils/chat_in_space.py,sha256=mBH4W-Jb8wgGCYV3m12LvoLjTE56xdwUTC-ghMupkSs,5889
|
|
39
|
+
unique_sdk/utils/file_io.py,sha256=z0VdAOtrkU-tMq2v-nogeHtBku3TtnM5eJDHAR6A0-w,5721
|
|
37
40
|
unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
|
|
38
41
|
unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
|
|
39
|
-
unique_sdk-0.10.
|
|
40
|
-
unique_sdk-0.10.
|
|
41
|
-
unique_sdk-0.10.
|
|
42
|
-
unique_sdk-0.10.
|
|
42
|
+
unique_sdk-0.10.71.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
|
43
|
+
unique_sdk-0.10.71.dist-info/METADATA,sha256=v508ITHPsp5HB70EIp0DjNWQg2wCzYVjFkF9G7bXHIk,12227
|
|
44
|
+
unique_sdk-0.10.71.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
45
|
+
unique_sdk-0.10.71.dist-info/RECORD,,
|