unique_sdk 0.10.22__py3-none-any.whl → 0.10.24__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_sdk/api_resources/_chat_completion.py +0 -49
- unique_sdk/api_resources/_folder.py +89 -0
- {unique_sdk-0.10.22.dist-info → unique_sdk-0.10.24.dist-info}/METADATA +50 -2
- {unique_sdk-0.10.22.dist-info → unique_sdk-0.10.24.dist-info}/RECORD +6 -6
- {unique_sdk-0.10.22.dist-info → unique_sdk-0.10.24.dist-info}/LICENSE +0 -0
- {unique_sdk-0.10.22.dist-info → unique_sdk-0.10.24.dist-info}/WHEEL +0 -0
@@ -1,13 +1,10 @@
|
|
1
1
|
from typing import (
|
2
|
-
Any,
|
3
2
|
ClassVar,
|
4
|
-
Dict,
|
5
3
|
List,
|
6
4
|
Literal,
|
7
5
|
NotRequired,
|
8
6
|
Optional,
|
9
7
|
TypedDict,
|
10
|
-
Union,
|
11
8
|
Unpack,
|
12
9
|
cast,
|
13
10
|
)
|
@@ -37,51 +34,6 @@ class ChatCompletionChoicesInner(TypedDict):
|
|
37
34
|
class ChatCompletion(APIResource["ChatCompletion"]):
|
38
35
|
OBJECT_NAME: ClassVar[Literal["openai.chat.completion"]] = "openai.chat.completion"
|
39
36
|
|
40
|
-
class FunctionDefinition(TypedDict, total=False):
|
41
|
-
name: str
|
42
|
-
description: Optional[str]
|
43
|
-
parameters: Optional[Dict[str, Any]]
|
44
|
-
|
45
|
-
class ChatCompletionsFunctionToolDefinition(TypedDict):
|
46
|
-
type: Literal["function"]
|
47
|
-
function: "ChatCompletion.FunctionDefinition"
|
48
|
-
|
49
|
-
class FunctionName(TypedDict):
|
50
|
-
name: str
|
51
|
-
|
52
|
-
class ChatCompletionsNamedFunctionToolSelectionName(TypedDict):
|
53
|
-
name: str
|
54
|
-
|
55
|
-
class ChatCompletionsNamedFunctionToolSelection(TypedDict):
|
56
|
-
type: Literal["function"]
|
57
|
-
function: "ChatCompletion.ChatCompletionsNamedFunctionToolSelectionName"
|
58
|
-
|
59
|
-
class ChatCompletionsTextResponseFormat(TypedDict, total=False):
|
60
|
-
type: Literal["text", "json_schema"]
|
61
|
-
json_schema: dict
|
62
|
-
|
63
|
-
class Options(TypedDict, total=False):
|
64
|
-
functions: NotRequired[List["ChatCompletion.FunctionDefinition"]]
|
65
|
-
reasoningEffort: NotRequired[Literal["low", "medium", "high", None]]
|
66
|
-
functionCall: NotRequired[
|
67
|
-
Union[Literal["auto", "none"], "ChatCompletion.FunctionName"]
|
68
|
-
]
|
69
|
-
maxTokens: NotRequired[int]
|
70
|
-
temperature: NotRequired[float]
|
71
|
-
topP: NotRequired[float]
|
72
|
-
logitBias: NotRequired[Dict[str, float]]
|
73
|
-
user: NotRequired[str]
|
74
|
-
n: NotRequired[int]
|
75
|
-
stop: NotRequired[List[str]]
|
76
|
-
presencePenalty: NotRequired[float]
|
77
|
-
frequencyPenalty: NotRequired[float]
|
78
|
-
seed: NotRequired[int]
|
79
|
-
responseFormat: NotRequired["ChatCompletion.ChatCompletionsTextResponseFormat"]
|
80
|
-
tools: NotRequired[List["ChatCompletion.ChatCompletionsFunctionToolDefinition"]]
|
81
|
-
toolChoice: NotRequired[
|
82
|
-
"ChatCompletion.ChatCompletionsNamedFunctionToolSelection"
|
83
|
-
]
|
84
|
-
|
85
37
|
class CreateParams(RequestOptions):
|
86
38
|
model: NotRequired[
|
87
39
|
Literal[
|
@@ -91,7 +43,6 @@ class ChatCompletion(APIResource["ChatCompletion"]):
|
|
91
43
|
]
|
92
44
|
timeout: NotRequired[Optional["int"]]
|
93
45
|
messages: List[ChatCompletionRequestMessage]
|
94
|
-
options: NotRequired["ChatCompletion.Options"]
|
95
46
|
|
96
47
|
model: Literal[
|
97
48
|
"AZURE_GPT_4_0613",
|
@@ -152,6 +152,17 @@ class Folder(APIResource["Folder"]):
|
|
152
152
|
scopeId: str | None = None
|
153
153
|
folderPath: str | None = None
|
154
154
|
|
155
|
+
class UpdateParams(RequestOptions):
|
156
|
+
"""
|
157
|
+
Parameters for updating a folder.
|
158
|
+
"""
|
159
|
+
|
160
|
+
scopeId: NotRequired[str]
|
161
|
+
folderPath: NotRequired[str]
|
162
|
+
parentFolderPath: NotRequired[str]
|
163
|
+
parentId: NotRequired[str]
|
164
|
+
name: NotRequired[str]
|
165
|
+
|
155
166
|
class GetInfosParams(RequestOptions):
|
156
167
|
"""
|
157
168
|
Parameters for getting multiple paginated folders by their parent Id.
|
@@ -407,6 +418,84 @@ class Folder(APIResource["Folder"]):
|
|
407
418
|
),
|
408
419
|
)
|
409
420
|
|
421
|
+
@classmethod
|
422
|
+
def update(
|
423
|
+
cls,
|
424
|
+
user_id: str,
|
425
|
+
company_id: str,
|
426
|
+
**params: Unpack["Folder.UpdateParams"],
|
427
|
+
) -> "Folder.FolderInfo":
|
428
|
+
"""
|
429
|
+
Update a folder given its id or path. Can update the name or the parent folder by specifying its id or path.
|
430
|
+
"""
|
431
|
+
|
432
|
+
scopeId = cls.resolve_scope_id_from_folder_path(
|
433
|
+
user_id=user_id,
|
434
|
+
company_id=company_id,
|
435
|
+
scope_id=params.get("scopeId"),
|
436
|
+
folder_path=params.get("folderPath"),
|
437
|
+
)
|
438
|
+
parentId = cls.resolve_scope_id_from_folder_path(
|
439
|
+
user_id=user_id,
|
440
|
+
company_id=company_id,
|
441
|
+
scope_id=params.get("parentId"),
|
442
|
+
folder_path=params.get("parentFolderPath"),
|
443
|
+
)
|
444
|
+
params.pop("folderPath", None)
|
445
|
+
params.pop("parentFolderPath", None)
|
446
|
+
if parentId:
|
447
|
+
params["parentId"] = parentId
|
448
|
+
|
449
|
+
return cast(
|
450
|
+
"Folder.FolderInfo",
|
451
|
+
cls._static_request(
|
452
|
+
"patch",
|
453
|
+
f"{cls.RESOURCE_URL}/{scopeId}",
|
454
|
+
user_id,
|
455
|
+
company_id=company_id,
|
456
|
+
params=params,
|
457
|
+
),
|
458
|
+
)
|
459
|
+
|
460
|
+
@classmethod
|
461
|
+
async def update_async(
|
462
|
+
cls,
|
463
|
+
user_id: str,
|
464
|
+
company_id: str,
|
465
|
+
**params: Unpack["Folder.UpdateParams"],
|
466
|
+
) -> "Folder.FolderInfo":
|
467
|
+
"""
|
468
|
+
Async update a folder given its id or path. Can update the name or the parent folder by specifying its id or path.
|
469
|
+
"""
|
470
|
+
|
471
|
+
scopeId = cls.resolve_scope_id_from_folder_path(
|
472
|
+
user_id=user_id,
|
473
|
+
company_id=company_id,
|
474
|
+
scope_id=params.get("scopeId"),
|
475
|
+
folder_path=params.get("folderPath"),
|
476
|
+
)
|
477
|
+
parentId = cls.resolve_scope_id_from_folder_path(
|
478
|
+
user_id=user_id,
|
479
|
+
company_id=company_id,
|
480
|
+
scope_id=params.get("parentId"),
|
481
|
+
folder_path=params.get("parentFolderPath"),
|
482
|
+
)
|
483
|
+
params.pop("folderPath", None)
|
484
|
+
params.pop("parentFolderPath", None)
|
485
|
+
if parentId:
|
486
|
+
params["parentId"] = parentId
|
487
|
+
|
488
|
+
return cast(
|
489
|
+
"Folder.FolderInfo",
|
490
|
+
await cls._static_request_async(
|
491
|
+
"patch",
|
492
|
+
f"{cls.RESOURCE_URL}/{scopeId}",
|
493
|
+
user_id,
|
494
|
+
company_id=company_id,
|
495
|
+
params=params,
|
496
|
+
),
|
497
|
+
)
|
498
|
+
|
410
499
|
@classmethod
|
411
500
|
def delete(
|
412
501
|
cls,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_sdk
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.24
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Author: Martin Fadler
|
@@ -797,7 +797,6 @@ chat_completion = unique_sdk.ChatCompletion.create(
|
|
797
797
|
],
|
798
798
|
options={
|
799
799
|
"temperature": 0.5, # optional
|
800
|
-
"reasoningEffort": "low", # optional
|
801
800
|
} # optional
|
802
801
|
)
|
803
802
|
```
|
@@ -1144,6 +1143,49 @@ unique_sdk.Folder.remove_access(
|
|
1144
1143
|
)
|
1145
1144
|
```
|
1146
1145
|
|
1146
|
+
#### `unique_sdk.Folder.update`
|
1147
|
+
Uupdate a folder specified by its `scopeId` or path. The following properties can be updated:
|
1148
|
+
- parent folder - move the folder to a new parent folder specified by its `scopeId` or path. If the new parent folder is the root folder, the `parentId` should be explicitly specificed by setting `newParentId` to `None`.
|
1149
|
+
- name - update the name by setting the `name` field to the new name.
|
1150
|
+
|
1151
|
+
Examples:
|
1152
|
+
|
1153
|
+
Move the folder specified by its `scopeId` to a new parent folder specified by its path.
|
1154
|
+
|
1155
|
+
```python
|
1156
|
+
unique_sdk.Folder.update(
|
1157
|
+
user_id=user_id,
|
1158
|
+
company_id=company_id,
|
1159
|
+
scopeId="scope_dwekjnf3330woioppm",
|
1160
|
+
parentFolderPath="/Company/folder1/folder2"
|
1161
|
+
)
|
1162
|
+
```
|
1163
|
+
|
1164
|
+
Move the parent of a folder specified by its path to a new parent folder specified by its `scopeId` and update the name to "January".
|
1165
|
+
|
1166
|
+
```python
|
1167
|
+
unique_sdk.Folder.update(
|
1168
|
+
user_id=user_id,
|
1169
|
+
company_id=company_id,
|
1170
|
+
folderPath="/Company/folder1",
|
1171
|
+
parentId="scope_dweekjrfhirtuhgroppm",
|
1172
|
+
name="January"
|
1173
|
+
)
|
1174
|
+
```
|
1175
|
+
|
1176
|
+
Move the parent of a folder specified by its path to the root folder and update the name to "January".
|
1177
|
+
|
1178
|
+
```python
|
1179
|
+
unique_sdk.Folder.update(
|
1180
|
+
user_id=user_id,
|
1181
|
+
company_id=company_id,
|
1182
|
+
folderPath="/Company/folder1",
|
1183
|
+
parentId=None,
|
1184
|
+
name="January"
|
1185
|
+
)
|
1186
|
+
```
|
1187
|
+
|
1188
|
+
|
1147
1189
|
#### `unique_sdk.Folder.delete` (Compatible with release >.36)
|
1148
1190
|
|
1149
1191
|
Given a `scopeId` or `folderPath`, the function deletes the folder. If the folder is not empty or if the user has no WRITE access, the delete will fail.
|
@@ -1583,6 +1625,12 @@ All notable changes to this project will be documented in this file.
|
|
1583
1625
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
1584
1626
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
1585
1627
|
|
1628
|
+
## [0.10.24] - 2025-09-17
|
1629
|
+
- Add function to update a folder.
|
1630
|
+
|
1631
|
+
## [0.10.23] - 2025-09-12
|
1632
|
+
- Revert to using default reasoning effort.
|
1633
|
+
|
1586
1634
|
## [0.10.22] - 2025-09-12
|
1587
1635
|
- Add support for metadata update of a file.
|
1588
1636
|
|
@@ -16,11 +16,11 @@ 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
18
|
unique_sdk/api_resources/_agentic_table.py,sha256=8-_f7t-m_iiiOj2835iESoxz91YRxl4-tkxpzQbgdcI,9958
|
19
|
-
unique_sdk/api_resources/_chat_completion.py,sha256=
|
19
|
+
unique_sdk/api_resources/_chat_completion.py,sha256=ILCAffxkbkfh2iV9L4KKnfe80gZmT9pWfkNmf3mq68U,2172
|
20
20
|
unique_sdk/api_resources/_content.py,sha256=pkRKOVNOB-7vaSPjXAHuT0RWXvduQ3-OMzGsDRSMvb4,14159
|
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=
|
23
|
+
unique_sdk/api_resources/_folder.py,sha256=gUTbpmlt0_O4Vjor7Vs-wbxxq13VvLUl5JPwPNFI9jc,15593
|
24
24
|
unique_sdk/api_resources/_integrated.py,sha256=O8e673z-RB7FRFMQYn_YEuHijebr5W7KJxkUnymbBZk,6164
|
25
25
|
unique_sdk/api_resources/_mcp.py,sha256=zKh0dyn0QnkKk57N2zlGVN_GQoxEp5T2CS38vVm6jQY,3341
|
26
26
|
unique_sdk/api_resources/_message.py,sha256=gEDIzg3METZU2k7m69meAuf0IWmZxnYOjbBKPRMwPYE,7688
|
@@ -36,7 +36,7 @@ unique_sdk/utils/chat_in_space.py,sha256=NrH9e2lvXtj_oePG0RWUqFoTanMblF8-VgtnVfs
|
|
36
36
|
unique_sdk/utils/file_io.py,sha256=YY8B7VJcTLOPmCXByiOfNerXGlAtjCC5EVNmAbQJ3dQ,4306
|
37
37
|
unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
|
38
38
|
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.
|
39
|
+
unique_sdk-0.10.24.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
40
|
+
unique_sdk-0.10.24.dist-info/METADATA,sha256=kOoLhAC0MUUf7MXB8WuVVgMxXgZNkZChCbq5JF_RiYY,56395
|
41
|
+
unique_sdk-0.10.24.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
42
|
+
unique_sdk-0.10.24.dist-info/RECORD,,
|
File without changes
|
File without changes
|