unique_sdk 0.10.51__py3-none-any.whl → 0.10.56__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.
@@ -27,7 +27,7 @@ class LogEntry(TypedDict):
27
27
  createdAt: str
28
28
  actorType: Literal["USER", "SYSTEM", "ASSISTANT", "TOOL"]
29
29
  messageId: NotRequired[str]
30
- details: NotRequired[list[LogDetail]]
30
+ details: NotRequired[LogDetail]
31
31
 
32
32
 
33
33
  class AgenticTableCell(TypedDict, total=False):
@@ -36,7 +36,7 @@ class AgenticTableCell(TypedDict, total=False):
36
36
  columnOrder: int
37
37
  rowLocked: bool
38
38
  text: str
39
- logEntries: list[LogEntry]
39
+ logEntries: list[LogEntry] | None
40
40
 
41
41
 
42
42
  class ColumnMetadataUpdateStatus(TypedDict, total=False):
@@ -73,6 +73,29 @@ class CellRendererTypes(StrEnum):
73
73
  SELECTABLE_CELL_RENDERER = "SelectableCellRenderer"
74
74
 
75
75
 
76
+ class MagicTableAction(StrEnum):
77
+ DELETE_ROW = "DeleteRow"
78
+ DELETE_COLUMN = "DeleteColumn"
79
+ UPDATE_CELL = "UpdateCell"
80
+ ADD_QUESTION_TEXT = "AddQuestionText"
81
+ ADD_META_DATA = "AddMetaData"
82
+ GENERATE_ARTIFACT = "GenerateArtifact"
83
+ SHEET_COMPLETED = "SheetCompleted"
84
+ LIBRARY_SHEET_ROW_VERIFIED = "LibrarySheetRowVerified"
85
+ SHEET_CREATED = "SheetCreated"
86
+
87
+
88
+ class ActivityStatus(StrEnum):
89
+ IN_PROGRESS = "IN_PROGRESS"
90
+ COMPLETED = "COMPLETED"
91
+ FAILED = "FAILED"
92
+
93
+
94
+ class SheetType(StrEnum):
95
+ DEFAULT = "DEFAULT"
96
+ LIBRARY = "LIBRARY"
97
+
98
+
76
99
  class SelectionMethod(StrEnum):
77
100
  DEFAULT = "DEFAULT"
78
101
  MANUAL = "MANUAL"
@@ -108,21 +131,8 @@ class AgenticTable(APIResource["AgenticTable"]):
108
131
 
109
132
  class SetActivityStatus(RequestOptions):
110
133
  tableId: str
111
- activity: Literal[
112
- "DeleteRow",
113
- "DeleteColumn",
114
- "UpdateCell",
115
- "AddQuestionText",
116
- "AddMetaData",
117
- "GenerateArtifact",
118
- "SheetCompleted",
119
- "LibrarySheetRowVerified",
120
- ]
121
- status: Literal[
122
- "IN_PROGRESS",
123
- "COMPLETED",
124
- "FAILED",
125
- ]
134
+ activity: MagicTableAction
135
+ status: ActivityStatus
126
136
  text: str
127
137
 
128
138
  class SetArtifact(RequestOptions):
@@ -69,6 +69,7 @@ class Folder(APIResource["Folder"]):
69
69
 
70
70
  class CreateParams(RequestOptions):
71
71
  paths: List[str]
72
+ inheritAccess: NotRequired[bool]
72
73
 
73
74
  class FolderInfo(TypedDict):
74
75
  """
@@ -42,6 +42,7 @@ class Integrated(APIResource["Integrated"]):
42
42
  chunkId: str
43
43
  key: str
44
44
  title: NotRequired["str"]
45
+ description: NotRequired["str"]
45
46
  url: NotRequired["str"]
46
47
 
47
48
  class ChatCompletionRequestMessage(TypedDict, total=False):
@@ -0,0 +1,338 @@
1
+ Metadata-Version: 2.1
2
+ Name: unique_sdk
3
+ Version: 0.10.56
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: openai (>=1.105.0,<2.0.0) ; extra == "openai"
15
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
16
+ Requires-Dist: typing-extensions (>=4.9.0,<5.0.0)
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Unique Python SDK
20
+
21
+
22
+ Visit: [https://unique-ag.github.io/](https://unique-ag.github.io/ai/unique-sdk/) for the documentation.
23
+
24
+ # Changelog
25
+
26
+ All notable changes to this project will be documented in this file.
27
+
28
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
29
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
30
+
31
+ ## [0.10.56] - 2025-12-05
32
+ - Add description field on create chat completions params.
33
+
34
+ ## [0.10.55] - 2025-12-04
35
+ - Allow configuring inherit access on folder creation.
36
+
37
+ ## [0.10.54] - 2025-12-02
38
+ - Add types for Agentic Table api methods.
39
+
40
+ ## [0.10.53] - 2025-12-01
41
+ - Improve OpenAI Proxy docs https://unique-ag.github.io/ai/unique-sdk/
42
+
43
+ ## [0.10.52] - 2025-11-21
44
+ - Centralized docs to https://unique-ag.github.io/ai/unique-sdk/
45
+
46
+ ## [0.10.51] - 2025-11-21
47
+ - Add function to get a space.
48
+
49
+ ## [0.10.50] - 2025-11-21
50
+ - Allow updating the configuration of a user and group.
51
+
52
+ ## [0.10.49] - 2025-11-21
53
+ - Add get folder by scope id function
54
+
55
+ ## [0.10.48] - 2025-11-20
56
+ - Update Agentic Table LogDetail and LogEntry types.
57
+
58
+ ## [0.10.47] - 2025-11-19
59
+ - Add expired/s at fields on content search result.
60
+
61
+ ## [0.10.46] - 2025-11-18
62
+ - chat_against_file function allows now a should_delete_chat flag.
63
+
64
+ ## [0.10.45] - 2025-11-18
65
+ - Create group and manage users functions.
66
+
67
+ ## [0.10.44] - 2025-11-18
68
+ - add function to get all messages in a chat.
69
+
70
+ ## [0.10.43] - 2025-11-14
71
+ - Add get, delete and update groups functions.
72
+
73
+ ## [0.10.42] - 2025-11-14
74
+ - Add get_users function.
75
+
76
+ ## [0.10.41] - 2025-11-13
77
+ - Add create_message and get_latest_message.
78
+
79
+ ## [0.10.40] - 2025-11-10
80
+ - Don't send description if not defined.
81
+
82
+ ## [0.10.39] - 2025-11-07
83
+ - Add function to get llm models
84
+
85
+ ## [0.10.38] - 2025-11-06
86
+ - Add description property to Reference and Content.
87
+
88
+ ## [0.10.37] - 2025-11-04
89
+ - Introduce local integration tests for Content API Resource
90
+
91
+ ## [0.10.36] - 2025-11-04
92
+ - Introduce local integration tests for Folder API Resource
93
+
94
+ ## [0.10.35] - 2025-11-04
95
+ - Inmprove folder get infos types.
96
+
97
+ ## [0.10.34] - 2025-10-29
98
+ - Add documentation for agentic table.
99
+
100
+ ## [0.10.33] - 2025-10-27
101
+ - Improve messagelog and message execution types.
102
+
103
+ ## [0.10.32] - 2025-10-14
104
+ - Add function to stream to chat frontend.
105
+
106
+ ## [0.10.31] - 2025-10-13
107
+ - Add readme for message log and execution.
108
+
109
+ ## [0.10.30] - 2025-10-07
110
+ - Improve types for content get infos.
111
+
112
+ ## [0.10.29] - 2025-10-06
113
+ - Switch default model used from `GPT-3.5-turbo (0125)` to `GPT-4o (1120)`
114
+
115
+ ## [0.10.28] - 2025-10-03
116
+ - Use non blocking versions of `Space.get_latest_message` and `Message.retrieve` in `send_message_and_wait_for_completion`.
117
+
118
+ ## [0.10.27] - 2025-09-24
119
+ - Improve readme to use Unique AI.
120
+
121
+ ## [0.10.26] - 2025-09-22
122
+ - Improve typing.
123
+
124
+ ## [0.10.25] - 2025-09-18
125
+ - Add support for udpate and delete files by file or folder path.
126
+
127
+ ## [0.10.24] - 2025-09-17
128
+ - Add function to update a folder.
129
+
130
+ ## [0.10.23] - 2025-09-12
131
+ - Revert to using default reasoning effort.
132
+
133
+ ## [0.10.22] - 2025-09-12
134
+ - Add support for metadata update of a file.
135
+
136
+ ## [0.10.21] - 2025-09-04
137
+ - Update Chat Completions API types and add support for reasoning effort.
138
+
139
+ ## [0.10.20] - 2025-09-04
140
+ - Update Responses API types
141
+
142
+ ## [0.10.19] - 2025-09-02
143
+ - Improve `send_message_and_wait_for_completion`:
144
+ - Add option to select stop_condition `["stoppedStreamingAt", "completedAt"]`.
145
+ - Load `debugInfo` from `last_user_message` for better developer experience.
146
+
147
+ ## [0.10.18] - 2025-09-02
148
+ - Temporarily remove support for update and delete files by filePath.
149
+
150
+ ## [0.10.17] - 2025-09-01
151
+ - Add function to update a file
152
+
153
+ ## [0.10.16] - 2025-08-31
154
+ - Add function to delete a content.
155
+
156
+ ## [0.10.15] - 2025-08-28
157
+ - Add default values for message log types
158
+
159
+ ## [0.10.14] - 2025-08-28
160
+ - Add function to delete folders and files recursively
161
+
162
+ ## [0.10.13] - 2025-08-24
163
+ - Add functions to create, get and update a message eecution and create and update a message log.
164
+
165
+ ## [0.10.12] - 2025-08-24
166
+ - Switch to using Content get info deprecated endpoint to make sure we support older release versions.
167
+
168
+ ## [0.10.11] - 2025-08-24
169
+ - Enforce usage of ruff using pipeline
170
+
171
+ ## [0.10.10] - 2025-08-18
172
+ - Fix wrong name of references in `Space.Message`.
173
+ - Fix wrong name of assessment in `Space.Message`.
174
+ - Remove default values for `text`, `originalText` and `debugInfo` in `Space.Message` as these don't have an effect.
175
+
176
+ ## [0.10.9] - 2025-08-15
177
+ - Add script to wait for content ingestion finished.
178
+
179
+ ## [0.10.8] - 2025-08-13
180
+ - Add support for Agentic Table.
181
+
182
+ ## [0.10.7] - 2025-08-13
183
+ - Make metadata optional when uploading a file.
184
+
185
+ ## [0.10.6] - 2025-08-06
186
+ - Make tools optional for running an agent.
187
+
188
+ ## [0.10.5] - 2025-08-06
189
+ - Get paginated files and folders info.
190
+
191
+ ## [0.10.4] - 2025-08-05
192
+ - Add support for reasoning API with streaming within a chat.
193
+
194
+ ## [0.10.3] - 2025-08-05
195
+ - Expose scoreThreshold param for search.
196
+
197
+ ## [0.10.2] - 2025-08-05
198
+ - Add script to chat against file.
199
+
200
+ ## [0.10.1] - 2025-08-05
201
+ - Allow deletion of a space chat.
202
+
203
+ ## [0.10.0] - 2025-08-04
204
+ - Add MCP support
205
+
206
+ ## [0.9.42] - 2025-07-31
207
+ - Fix wrong chat in space example.
208
+
209
+ ## [0.9.41] - 2025-07-31
210
+ - Fix double-slash error in open ai proxy script.
211
+
212
+ ## [0.9.40] - 2025-07-22
213
+ - Fixed bug where get requests send body with the request. This is not allowed by WAF policies.
214
+
215
+ ## [0.9.39] - 2025-07-18
216
+ - Add script to chat in a space.
217
+
218
+ ## [0.9.38] - 2025-07-18
219
+ - [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`.
220
+
221
+ ## [0.9.37] - 2025-07-10
222
+ - Add `sheetName` property to the `MagicTableSheetIngestParams` object used by function that ingests magic table sheets.
223
+
224
+ ## [0.9.36] - 2025-06-23
225
+ - Allow passing a user id when creating chat completions. This is optional and it does not impact the current behaviour.
226
+
227
+ ## [0.9.35] - 2025-06-18
228
+ - Allow scope access updates (add/remove) on folder based on scope id or path.
229
+
230
+ ## [0.9.34] - 2025-06-17
231
+ - Allow ingestion config updates on folder based on scope id or path.
232
+
233
+ ## [0.9.33] - 2025-06-11
234
+ - Add function to get a folder by id or by path.
235
+
236
+ ## [0.9.32] - 2025-06-11
237
+ - Add function to ingest magic table sheets.
238
+
239
+ ## [0.9.31] - 2025-05-21
240
+ - Add function to update folder access (add or remove).
241
+
242
+ ## [0.9.30] - 2025-05-21
243
+ - Add function to update folder ingestion config.
244
+
245
+ ## [0.9.29] - 2025-05-20
246
+ - Add function to create folder paths if they do not exist.
247
+
248
+ ## [0.9.28] - 2025-05-20
249
+ - Add function to search content info. This also allows filtering content info by metadata info.
250
+
251
+ ## [0.9.27] - 2025-05-14
252
+ - Add the possibility to specify metadata when creating or updating a Content.
253
+
254
+ ## [0.9.26] - 2025-05-13
255
+ - Add the possibility to specify ingestionConfig when creating or updating a Content.
256
+
257
+ ## [0.9.25] - 2025-05-02
258
+ - Fixed typos in `README.md`, including incorrect `sdk.utils` imports and code example errors.
259
+
260
+ ## [0.9.24] - 2025-04-23
261
+ - Make `chatId` property in `Search.CreateParams` optional
262
+
263
+ ## [0.9.23] - 2025-03-25
264
+ - Define programming language classifier explicitly for python 3.11
265
+
266
+ ## [0.9.22] - 2025-02-25
267
+ - update the retry_on_error to only `APIError` and `APIConnectionError` update the `resp["error"]` to be `resp.get("error")` to avoid key error
268
+
269
+ ## [0.9.21] - 2025-02-21
270
+ - Add title parameter and change labels in `MessageAssessment`
271
+
272
+ ## [0.9.20] - 2025-02-01
273
+ - Add url parameter to `MessageAssessment.create_async` and `MessageAssessment.modify_async`
274
+
275
+ ## [0.9.19] - 2025-01-31
276
+ - Add `MessageAssessment` resource
277
+
278
+ ## [0.9.18] - 2025-01-22
279
+ - Removed `Invalid response body from API` from `retry_dict` as it's our own artificail error.
280
+
281
+ ## [0.9.17] - 2025-01-03
282
+ - BREAKING CHANGE!! Removed unused `id` from `ShortTermMemory` create and find methods.
283
+
284
+ ## [0.9.16] - 2024-12-19
285
+ - Corrected return type of `Search.create` and `Search.create_async` to `List[Search]`
286
+ - Retry on `Connection aborted` error
287
+
288
+ ## [0.9.15] - 2024-12-06
289
+ - Add `Internal server error` and `You can retry your request` to the retry logic
290
+
291
+ ## [0.9.14] - 2024-12-06
292
+ - Add `contentIds` to `Search.create` and `Search.create_async`
293
+
294
+ ## [0.9.13] - 2024-10-23
295
+ - Add retry for `5xx` errors, add additional error message.
296
+
297
+ ## [0.9.12] - 2024-11-21
298
+ - Include original error message in returned exceptions
299
+
300
+ ## [0.9.11] - 2024-11-18
301
+ - Add `ingestionConfig` to `UpsertParams.Input` parameters
302
+
303
+ ## [0.9.10] - 2024-10-23
304
+ - 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.
305
+
306
+ ## [0.9.9] - 2024-10-23
307
+ - Revert deletion of `Message.retrieve` method
308
+
309
+ ## [0.9.8] - 2024-10-16
310
+ - Add `retries` for `_static_request` and `_static_request_async` in `APIResource` - When the error messages contains either `"problem proxying the request"`,
311
+ or `"Upstream service reached a hard timeout"`,
312
+ ## [0.9.7] - 2024-09-23
313
+ - Add `completedAt` to `CreateParams` of `Message`
314
+
315
+ ## [0.9.6] - 2024-09-03
316
+ - Added `metaDataFilter` to `Search` parameters.
317
+
318
+ ## [0.9.5] - 2024-08-07
319
+ - Add `completedAt` to `ModifyParams`
320
+
321
+ ## [0.9.4] - 2024-07-31
322
+ - Add `close` and `close_async` to `http_client`
323
+ - Make `httpx` the default client for async requests
324
+
325
+ ## [0.9.3] - 2024-07-31
326
+ - `Search.create`, `Message`, `ChatCompletion` parameters that were marked `NotRequired` are now also `Optional`
327
+
328
+ ## [0.9.2] - 2024-07-30
329
+ - Bug fix in `Search.create`: langugage -> language
330
+
331
+ ## [0.9.1] - 2024-07-30
332
+ - Added parameters to `Search.create` and `Search.create_async`
333
+ - `language` for full text search
334
+ - `reranker` to reranker search results
335
+
336
+ ## [0.9.0] - 2024-07-29
337
+ - Added the possibility to make async requests to the unique APIs using either aiohttp or httpx as client
338
+
@@ -15,14 +15,14 @@ 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=ejYVASkJshxyI89TrC2dMdhwOJ0fEjYOsh1DeTluBO4,9952
18
+ unique_sdk/api_resources/_agentic_table.py,sha256=GN-GBgWEwRZOdKsx6DoHPZpjrr71PUGtyuJk20ETmFY,10208
19
19
  unique_sdk/api_resources/_chat_completion.py,sha256=ILCAffxkbkfh2iV9L4KKnfe80gZmT9pWfkNmf3mq68U,2172
20
20
  unique_sdk/api_resources/_content.py,sha256=vRynwj4QBZA1v2CVg_xbhmLqqh3m4cPGMoLeFZTaSYA,17543
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=PRNTsyrtfWnHS8wR1Ls16_iXlNFjOmTjlwxSSjCTrAo,16904
23
+ unique_sdk/api_resources/_folder.py,sha256=4I_b5GFGJUcRNcebCWcM8aDm0DQ6g6Y4JrkpUNxtJSc,16945
24
24
  unique_sdk/api_resources/_group.py,sha256=8A8mSjhWuhFxBA2r_z7q-70miJ_ugz7NAffVwbPu1oo,10302
25
- unique_sdk/api_resources/_integrated.py,sha256=O8e673z-RB7FRFMQYn_YEuHijebr5W7KJxkUnymbBZk,6164
25
+ unique_sdk/api_resources/_integrated.py,sha256=TxEKSYQZjZezBUk6kUgLvCgqgZXvgZR2IqHLieapKwQ,6204
26
26
  unique_sdk/api_resources/_llm_models.py,sha256=3Jn6MpxWgZ43Hze8JHd4_n27si5xmwd3JE8r8cEZq_M,1640
27
27
  unique_sdk/api_resources/_mcp.py,sha256=zKh0dyn0QnkKk57N2zlGVN_GQoxEp5T2CS38vVm6jQY,3341
28
28
  unique_sdk/api_resources/_message.py,sha256=tSS_jVwoAffBFH6RSClEnbRf48MleL7RMs3MnbNDq-E,10986
@@ -39,7 +39,7 @@ unique_sdk/utils/chat_in_space.py,sha256=e_Ny03eB7Q8oijdUR_sPlFTIgq2rsCbSR-Sin8j
39
39
  unique_sdk/utils/file_io.py,sha256=lskRULIh7qExK26o_1YqRs0f5mqJHTS9m_mdxlsVo4s,4497
40
40
  unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
41
41
  unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
42
- unique_sdk-0.10.51.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
43
- unique_sdk-0.10.51.dist-info/METADATA,sha256=cxsS4dYfr_-0nfPYemOmvufXO9XpbinIasdMkyQMqag,75966
44
- unique_sdk-0.10.51.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
45
- unique_sdk-0.10.51.dist-info/RECORD,,
42
+ unique_sdk-0.10.56.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
43
+ unique_sdk-0.10.56.dist-info/METADATA,sha256=TRZBMVYh2i5ZRDBbODnEaJn_WWJOurtgoV25fwgJUBY,10484
44
+ unique_sdk-0.10.56.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
45
+ unique_sdk-0.10.56.dist-info/RECORD,,