unique_sdk 0.10.25__tar.gz → 0.10.27__tar.gz
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-0.10.25 → unique_sdk-0.10.27}/CHANGELOG.md +6 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/PKG-INFO +13 -7
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/README.md +6 -6
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/pyproject.toml +1 -1
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_content.py +21 -15
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_folder.py +24 -20
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_message_execution.py +6 -6
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_message_log.py +9 -9
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_space.py +16 -5
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/utils/chat_in_space.py +3 -3
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/utils/file_io.py +5 -1
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/LICENSE +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/__init__.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_api_requestor.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_api_resource.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_api_version.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_error.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_http_client.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_list_object.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_object_classes.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_request_options.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_unique_object.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_unique_ql.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_unique_response.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_util.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_version.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/_webhook.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/__init__.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_acronyms.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_agentic_table.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_chat_completion.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_embedding.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_event.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_integrated.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_mcp.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_message.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_message_assessment.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_search.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_search_string.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/api_resources/_short_term_memory.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/utils/chat_history.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/utils/sources.py +0 -0
- {unique_sdk-0.10.25 → unique_sdk-0.10.27}/unique_sdk/utils/token.py +0 -0
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.10.27] - 2025-09-24
|
|
9
|
+
- Improve readme to use Unique AI.
|
|
10
|
+
|
|
11
|
+
## [0.10.26] - 2025-09-22
|
|
12
|
+
- Improve typing.
|
|
13
|
+
|
|
8
14
|
## [0.10.25] - 2025-09-18
|
|
9
15
|
- Add support for udpate and delete files by file or folder path.
|
|
10
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_sdk
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.27
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -18,9 +18,9 @@ Description-Content-Type: text/markdown
|
|
|
18
18
|
|
|
19
19
|
# Unique Python SDK
|
|
20
20
|
|
|
21
|
-
Unique
|
|
21
|
+
Unique Unique AI is a tailored solution for the financial industry, designed to increase productivity by automating manual workloads through AI and ChatGPT solutions.
|
|
22
22
|
|
|
23
|
-
The Unique Python SDK provides access to the public API of Unique
|
|
23
|
+
The Unique Python SDK provides access to the public API of Unique Unique AI. It also enables verification of Webhook signatures to ensure the authenticity of incoming Webhook requests.
|
|
24
24
|
|
|
25
25
|
## Table of Contents
|
|
26
26
|
|
|
@@ -112,7 +112,7 @@ print(messages.data[0].text)
|
|
|
112
112
|
|
|
113
113
|
## Webhook Triggers
|
|
114
114
|
|
|
115
|
-
A core functionality of
|
|
115
|
+
A core functionality of Unique AI is the ability for users to engage in an interactive chat feature. SDK developers can hook into this chat to provide new functionalities.
|
|
116
116
|
|
|
117
117
|
Your App (refer to `app-id` in [Requirements](#requirements)) must be subscribed to each individual Unique event in order to receive a webhook.
|
|
118
118
|
|
|
@@ -226,7 +226,7 @@ This trigger can be used in combination with assistants marked as `external`. Th
|
|
|
226
226
|
}
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
This Webhook is triggered when the Unique
|
|
229
|
+
This Webhook is triggered when the Unique Unique AI AI selects an external module as the best response to a user message. The module must be marked as `external` and available for the assistant used in the chat to be selected by the AI.
|
|
230
230
|
|
|
231
231
|
Unique's UI will create an empty `assistantMessage` below the user message and update this message with status updates.
|
|
232
232
|
|
|
@@ -821,7 +821,7 @@ unique_sdk.Integrated.responses_stream(
|
|
|
821
821
|
|
|
822
822
|
#### `unique_sdk.ChatCompletion.create`
|
|
823
823
|
|
|
824
|
-
Send a prompt to an AI model supported by Unique
|
|
824
|
+
Send a prompt to an AI model supported by Unique Unique AI and receive a result. The `messages` attribute must follow the [OpenAI API format](https://platform.openai.com/docs/api-reference/chat).
|
|
825
825
|
|
|
826
826
|
```python
|
|
827
827
|
chat_completion = unique_sdk.ChatCompletion.create(
|
|
@@ -871,7 +871,7 @@ print(result)
|
|
|
871
871
|
|
|
872
872
|
#### `unique_sdk.Search.create`
|
|
873
873
|
|
|
874
|
-
Search the Unique
|
|
874
|
+
Search the Unique Unique AI Knowledge database for RAG (Retrieval-Augmented Generation). The API supports vector search and a `searchType` that combines vector and full-text search, enhancing the precision of search results.
|
|
875
875
|
|
|
876
876
|
These are the options are available for `searchType`:
|
|
877
877
|
|
|
@@ -1662,6 +1662,12 @@ All notable changes to this project will be documented in this file.
|
|
|
1662
1662
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
1663
1663
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
1664
1664
|
|
|
1665
|
+
## [0.10.27] - 2025-09-24
|
|
1666
|
+
- Improve readme to use Unique AI.
|
|
1667
|
+
|
|
1668
|
+
## [0.10.26] - 2025-09-22
|
|
1669
|
+
- Improve typing.
|
|
1670
|
+
|
|
1665
1671
|
## [0.10.25] - 2025-09-18
|
|
1666
1672
|
- Add support for udpate and delete files by file or folder path.
|
|
1667
1673
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Unique Python SDK
|
|
2
2
|
|
|
3
|
-
Unique
|
|
3
|
+
Unique Unique AI is a tailored solution for the financial industry, designed to increase productivity by automating manual workloads through AI and ChatGPT solutions.
|
|
4
4
|
|
|
5
|
-
The Unique Python SDK provides access to the public API of Unique
|
|
5
|
+
The Unique Python SDK provides access to the public API of Unique Unique AI. It also enables verification of Webhook signatures to ensure the authenticity of incoming Webhook requests.
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
@@ -94,7 +94,7 @@ print(messages.data[0].text)
|
|
|
94
94
|
|
|
95
95
|
## Webhook Triggers
|
|
96
96
|
|
|
97
|
-
A core functionality of
|
|
97
|
+
A core functionality of Unique AI is the ability for users to engage in an interactive chat feature. SDK developers can hook into this chat to provide new functionalities.
|
|
98
98
|
|
|
99
99
|
Your App (refer to `app-id` in [Requirements](#requirements)) must be subscribed to each individual Unique event in order to receive a webhook.
|
|
100
100
|
|
|
@@ -208,7 +208,7 @@ This trigger can be used in combination with assistants marked as `external`. Th
|
|
|
208
208
|
}
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
This Webhook is triggered when the Unique
|
|
211
|
+
This Webhook is triggered when the Unique Unique AI AI selects an external module as the best response to a user message. The module must be marked as `external` and available for the assistant used in the chat to be selected by the AI.
|
|
212
212
|
|
|
213
213
|
Unique's UI will create an empty `assistantMessage` below the user message and update this message with status updates.
|
|
214
214
|
|
|
@@ -803,7 +803,7 @@ unique_sdk.Integrated.responses_stream(
|
|
|
803
803
|
|
|
804
804
|
#### `unique_sdk.ChatCompletion.create`
|
|
805
805
|
|
|
806
|
-
Send a prompt to an AI model supported by Unique
|
|
806
|
+
Send a prompt to an AI model supported by Unique Unique AI and receive a result. The `messages` attribute must follow the [OpenAI API format](https://platform.openai.com/docs/api-reference/chat).
|
|
807
807
|
|
|
808
808
|
```python
|
|
809
809
|
chat_completion = unique_sdk.ChatCompletion.create(
|
|
@@ -853,7 +853,7 @@ print(result)
|
|
|
853
853
|
|
|
854
854
|
#### `unique_sdk.Search.create`
|
|
855
855
|
|
|
856
|
-
Search the Unique
|
|
856
|
+
Search the Unique Unique AI Knowledge database for RAG (Retrieval-Augmented Generation). The API supports vector search and a `searchType` that combines vector and full-text search, enhancing the precision of search results.
|
|
857
857
|
|
|
858
858
|
These are the options are available for `searchType`:
|
|
859
859
|
|
|
@@ -73,7 +73,7 @@ class Content(APIResource["Content"]):
|
|
|
73
73
|
|
|
74
74
|
class SearchParams(RequestOptions):
|
|
75
75
|
where: "Content.ContentWhereInput"
|
|
76
|
-
chatId: NotRequired[str]
|
|
76
|
+
chatId: NotRequired[str | None]
|
|
77
77
|
includeFailedContent: NotRequired[bool]
|
|
78
78
|
|
|
79
79
|
class ContentInfoParams(TypedDict):
|
|
@@ -82,10 +82,10 @@ class Content(APIResource["Content"]):
|
|
|
82
82
|
This is used to retrieve information about content based on various filters.
|
|
83
83
|
"""
|
|
84
84
|
|
|
85
|
-
metadataFilter: NotRequired[dict]
|
|
86
|
-
skip: NotRequired[int]
|
|
87
|
-
take: NotRequired[int]
|
|
88
|
-
filePath: NotRequired[str]
|
|
85
|
+
metadataFilter: NotRequired[dict[str, Any] | None]
|
|
86
|
+
skip: NotRequired[int | None]
|
|
87
|
+
take: NotRequired[int | None]
|
|
88
|
+
filePath: NotRequired[str | None]
|
|
89
89
|
|
|
90
90
|
class CustomApiOptions(TypedDict):
|
|
91
91
|
apiIdentifier: str
|
|
@@ -114,19 +114,19 @@ class Content(APIResource["Content"]):
|
|
|
114
114
|
key: str
|
|
115
115
|
title: Optional[str]
|
|
116
116
|
mimeType: str
|
|
117
|
-
ownerType: str
|
|
118
|
-
ownerId: str
|
|
119
|
-
byteSize:
|
|
120
|
-
ingestionConfig: "Content.IngestionConfig"
|
|
121
|
-
metadata: NotRequired[dict[str,
|
|
117
|
+
ownerType: NotRequired[str | None]
|
|
118
|
+
ownerId: NotRequired[str | None]
|
|
119
|
+
byteSize: NotRequired[int | None]
|
|
120
|
+
ingestionConfig: NotRequired["Content.IngestionConfig | None"]
|
|
121
|
+
metadata: NotRequired[dict[str, Any] | None]
|
|
122
122
|
|
|
123
123
|
class UpsertParams(RequestOptions):
|
|
124
124
|
input: "Content.Input"
|
|
125
|
-
scopeId:
|
|
126
|
-
chatId:
|
|
127
|
-
sourceOwnerType: str
|
|
128
|
-
storeInternally: bool
|
|
129
|
-
fileUrl:
|
|
125
|
+
scopeId: NotRequired[str | None]
|
|
126
|
+
chatId: NotRequired[str | None]
|
|
127
|
+
sourceOwnerType: NotRequired[str | None]
|
|
128
|
+
storeInternally: NotRequired[bool | None]
|
|
129
|
+
fileUrl: NotRequired[str | None]
|
|
130
130
|
|
|
131
131
|
class UpdateParams(RequestOptions):
|
|
132
132
|
contentId: NotRequired[str]
|
|
@@ -186,6 +186,8 @@ class Content(APIResource["Content"]):
|
|
|
186
186
|
updatedAt: str
|
|
187
187
|
chunks: List[Chunk]
|
|
188
188
|
metadata: Optional[Dict[str, Any]]
|
|
189
|
+
writeUrl: str
|
|
190
|
+
readUrl: str
|
|
189
191
|
|
|
190
192
|
class MagicTableSheetTableColumn(TypedDict):
|
|
191
193
|
columnId: str
|
|
@@ -547,6 +549,10 @@ class Content(APIResource["Content"]):
|
|
|
547
549
|
"""
|
|
548
550
|
Returns the contentId to use: if content_id is provided, returns it;
|
|
549
551
|
if not, but file_path is provided, resolves and returns the id for that file path.
|
|
552
|
+
|
|
553
|
+
Returns:
|
|
554
|
+
str: The resolved content ID.
|
|
555
|
+
None: Failed to resolve a content ID (e.g., file_path not found or not provided).
|
|
550
556
|
"""
|
|
551
557
|
if content_id:
|
|
552
558
|
return content_id
|
|
@@ -44,19 +44,19 @@ class Folder(APIResource["Folder"]):
|
|
|
44
44
|
languageModel: str | None
|
|
45
45
|
|
|
46
46
|
class IngestionConfig(TypedDict):
|
|
47
|
-
chunkMaxTokens: int | None
|
|
48
|
-
chunkMaxTokensOnePager: int | None
|
|
49
|
-
chunkMinTokens: int | None
|
|
50
|
-
chunkStrategy: str | None
|
|
51
|
-
customApiOptions: List["Folder.CustomApiOptions"] | None
|
|
52
|
-
documentMinTokens: int | None
|
|
53
|
-
excelReadMode: str | None
|
|
54
|
-
jpgReadMode: str | None
|
|
55
|
-
pdfReadMode: str | None
|
|
56
|
-
pptReadMode: str | None
|
|
47
|
+
chunkMaxTokens: NotRequired[int | None]
|
|
48
|
+
chunkMaxTokensOnePager: NotRequired[int | None]
|
|
49
|
+
chunkMinTokens: NotRequired[int | None]
|
|
50
|
+
chunkStrategy: NotRequired[str | None]
|
|
51
|
+
customApiOptions: NotRequired[List["Folder.CustomApiOptions"] | None]
|
|
52
|
+
documentMinTokens: NotRequired[int | None]
|
|
53
|
+
excelReadMode: NotRequired[str | None]
|
|
54
|
+
jpgReadMode: NotRequired[str | None]
|
|
55
|
+
pdfReadMode: NotRequired[str | None]
|
|
56
|
+
pptReadMode: NotRequired[str | None]
|
|
57
57
|
uniqueIngestionMode: str
|
|
58
|
-
vttConfig:
|
|
59
|
-
wordReadMode: str | None
|
|
58
|
+
vttConfig: NotRequired["Folder.VttConfig | None"]
|
|
59
|
+
wordReadMode: NotRequired[str | None]
|
|
60
60
|
|
|
61
61
|
class CreatedFolder(TypedDict):
|
|
62
62
|
id: str
|
|
@@ -93,8 +93,8 @@ class Folder(APIResource["Folder"]):
|
|
|
93
93
|
Parameters for updating folder ingestion config.
|
|
94
94
|
"""
|
|
95
95
|
|
|
96
|
-
scopeId: str | None
|
|
97
|
-
folderPath: str | None
|
|
96
|
+
scopeId: NotRequired[str | None]
|
|
97
|
+
folderPath: NotRequired[str | None]
|
|
98
98
|
ingestionConfig: "Folder.IngestionConfig"
|
|
99
99
|
applyToSubScopes: bool
|
|
100
100
|
|
|
@@ -103,8 +103,8 @@ class Folder(APIResource["Folder"]):
|
|
|
103
103
|
Parameters for adding access to a folder.
|
|
104
104
|
"""
|
|
105
105
|
|
|
106
|
-
scopeId: str | None
|
|
107
|
-
folderPath: str | None
|
|
106
|
+
scopeId: NotRequired[str | None]
|
|
107
|
+
folderPath: NotRequired[str | None]
|
|
108
108
|
scopeAccesses: List["Folder.ScopeAccess"]
|
|
109
109
|
applyToSubScopes: bool
|
|
110
110
|
|
|
@@ -113,8 +113,8 @@ class Folder(APIResource["Folder"]):
|
|
|
113
113
|
Parameters for removing access from a folder.
|
|
114
114
|
"""
|
|
115
115
|
|
|
116
|
-
scopeId: str | None
|
|
117
|
-
folderPath: str | None
|
|
116
|
+
scopeId: NotRequired[str | None]
|
|
117
|
+
folderPath: NotRequired[str | None]
|
|
118
118
|
scopeAccesses: List["Folder.ScopeAccess"]
|
|
119
119
|
applyToSubScopes: bool
|
|
120
120
|
|
|
@@ -250,7 +250,7 @@ class Folder(APIResource["Folder"]):
|
|
|
250
250
|
cls, user_id: str, company_id: str, **params: Unpack["Folder.CreateParams"]
|
|
251
251
|
) -> "Folder.CreateFolderStructureResponse":
|
|
252
252
|
return cast(
|
|
253
|
-
"Folder",
|
|
253
|
+
"Folder.CreateFolderStructureResponse",
|
|
254
254
|
cls._static_request(
|
|
255
255
|
"post",
|
|
256
256
|
cls.RESOURCE_URL,
|
|
@@ -265,7 +265,7 @@ class Folder(APIResource["Folder"]):
|
|
|
265
265
|
cls, user_id: str, company_id: str, **params: Unpack["Folder.CreateParams"]
|
|
266
266
|
) -> "Folder.CreateFolderStructureResponse":
|
|
267
267
|
return cast(
|
|
268
|
-
"Folder",
|
|
268
|
+
"Folder.CreateFolderStructureResponse",
|
|
269
269
|
await cls._static_request_async(
|
|
270
270
|
"post",
|
|
271
271
|
cls.RESOURCE_URL,
|
|
@@ -545,6 +545,10 @@ class Folder(APIResource["Folder"]):
|
|
|
545
545
|
"""
|
|
546
546
|
Returns the scopeId to use: if scope_id is provided, returns it;
|
|
547
547
|
if not, but folder_path is provided, resolves and returns the id for that folder path.
|
|
548
|
+
|
|
549
|
+
Returns:
|
|
550
|
+
str: The resolved folder ID.
|
|
551
|
+
None: Failed to resolve a folder ID (e.g., folder_path not found or not provided).
|
|
548
552
|
"""
|
|
549
553
|
if scope_id:
|
|
550
554
|
return scope_id
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import ClassVar, Literal, Unpack, cast
|
|
1
|
+
from typing import ClassVar, Literal, NotRequired, Unpack, cast
|
|
2
2
|
|
|
3
3
|
from unique_sdk._api_resource import APIResource
|
|
4
4
|
from unique_sdk._request_options import RequestOptions
|
|
@@ -15,9 +15,9 @@ class MessageExecution(APIResource["MessageExecution"]):
|
|
|
15
15
|
|
|
16
16
|
messageId: str
|
|
17
17
|
chatId: str
|
|
18
|
-
type: Literal["DEEP_RESEARCH"]
|
|
19
|
-
secondsRemaining: int | None
|
|
20
|
-
percentageCompleted: int | None
|
|
18
|
+
type: Literal["DEEP_RESEARCH"]
|
|
19
|
+
secondsRemaining: NotRequired[int | None]
|
|
20
|
+
percentageCompleted: NotRequired[int | None]
|
|
21
21
|
|
|
22
22
|
class GetMessageExecutionParams(RequestOptions):
|
|
23
23
|
"""
|
|
@@ -33,8 +33,8 @@ class MessageExecution(APIResource["MessageExecution"]):
|
|
|
33
33
|
|
|
34
34
|
messageId: str
|
|
35
35
|
status: Literal["COMPLETED", "FAILED"]
|
|
36
|
-
secondsRemaining: int | None
|
|
37
|
-
percentageCompleted: int | None
|
|
36
|
+
secondsRemaining: NotRequired[int | None]
|
|
37
|
+
percentageCompleted: NotRequired[int | None]
|
|
38
38
|
|
|
39
39
|
messageExecutionId: str | None
|
|
40
40
|
messageId: str | None
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import ClassVar, Literal, TypedDict, Unpack, cast
|
|
1
|
+
from typing import ClassVar, Literal, NotRequired, TypedDict, Unpack, cast
|
|
2
2
|
|
|
3
3
|
from unique_sdk._api_resource import APIResource
|
|
4
4
|
from unique_sdk._request_options import RequestOptions
|
|
@@ -25,21 +25,21 @@ class MessageLog(APIResource["MessageLog"]):
|
|
|
25
25
|
text: str
|
|
26
26
|
status: Literal["RUNNING", "COMPLETED", "FAILED"]
|
|
27
27
|
order: int
|
|
28
|
-
details: dict | None
|
|
29
|
-
uncitedReferences: dict | None
|
|
30
|
-
references: list["MessageLog.Reference"] | None
|
|
28
|
+
details: NotRequired[dict | None]
|
|
29
|
+
uncitedReferences: NotRequired[dict | None]
|
|
30
|
+
references: NotRequired[list["MessageLog.Reference"] | None]
|
|
31
31
|
|
|
32
32
|
class UpdateMessageLogParams(RequestOptions):
|
|
33
33
|
"""
|
|
34
34
|
Parameters for updating a message log.
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
-
text: str | None
|
|
38
|
-
status: Literal["RUNNING", "COMPLETED", "FAILED"] | None
|
|
37
|
+
text: NotRequired[str | None]
|
|
38
|
+
status: NotRequired[Literal["RUNNING", "COMPLETED", "FAILED"] | None]
|
|
39
39
|
order: int
|
|
40
|
-
details: dict | None
|
|
41
|
-
uncitedReferences: dict | None
|
|
42
|
-
references: list["MessageLog.Reference"] | None
|
|
40
|
+
details: NotRequired[dict | None]
|
|
41
|
+
uncitedReferences: NotRequired[dict | None]
|
|
42
|
+
references: NotRequired[list["MessageLog.Reference"] | None]
|
|
43
43
|
|
|
44
44
|
messageLogId: str | None
|
|
45
45
|
messageId: str | None
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import (
|
|
2
|
+
Any,
|
|
3
|
+
ClassVar,
|
|
4
|
+
Dict,
|
|
5
|
+
List,
|
|
6
|
+
Literal,
|
|
7
|
+
NotRequired,
|
|
8
|
+
Optional,
|
|
9
|
+
TypedDict,
|
|
10
|
+
Unpack,
|
|
11
|
+
cast,
|
|
12
|
+
)
|
|
2
13
|
|
|
3
14
|
from unique_sdk._api_resource import APIResource
|
|
4
15
|
from unique_sdk._request_options import RequestOptions
|
|
@@ -12,11 +23,11 @@ class Space(APIResource["Space"]):
|
|
|
12
23
|
Parameters for querying the assistant for a message.
|
|
13
24
|
"""
|
|
14
25
|
|
|
15
|
-
chatId: str | None
|
|
26
|
+
chatId: NotRequired[str | None]
|
|
16
27
|
assistantId: str
|
|
17
|
-
text: str | None
|
|
18
|
-
toolChoices: List[str]
|
|
19
|
-
scopeRules: dict | None
|
|
28
|
+
text: NotRequired[str | None]
|
|
29
|
+
toolChoices: NotRequired[List[str] | None]
|
|
30
|
+
scopeRules: NotRequired[dict | None]
|
|
20
31
|
|
|
21
32
|
class Reference(TypedDict):
|
|
22
33
|
"""
|
|
@@ -12,9 +12,9 @@ async def send_message_and_wait_for_completion(
|
|
|
12
12
|
company_id: str,
|
|
13
13
|
assistant_id: str,
|
|
14
14
|
text: str,
|
|
15
|
-
tool_choices: List[str] = None,
|
|
15
|
+
tool_choices: List[str] | None = None,
|
|
16
16
|
scope_rules: dict | None = None,
|
|
17
|
-
chat_id: str = None,
|
|
17
|
+
chat_id: str | None = None,
|
|
18
18
|
poll_interval: float = 1.0,
|
|
19
19
|
max_wait: float = 60.0,
|
|
20
20
|
stop_condition: Literal["stoppedStreamingAt", "completedAt"] = "stoppedStreamingAt",
|
|
@@ -152,7 +152,7 @@ async def wait_for_ingestion_completion(
|
|
|
152
152
|
user_id: str,
|
|
153
153
|
company_id: str,
|
|
154
154
|
content_id: str,
|
|
155
|
-
chat_id: str = None,
|
|
155
|
+
chat_id: str | None = None,
|
|
156
156
|
poll_interval: float = 1.0,
|
|
157
157
|
max_wait: float = 60.0,
|
|
158
158
|
):
|
|
@@ -110,7 +110,11 @@ def upload_file(
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
def download_content(
|
|
113
|
-
companyId: str,
|
|
113
|
+
companyId: str,
|
|
114
|
+
userId: str,
|
|
115
|
+
content_id: str,
|
|
116
|
+
filename: str,
|
|
117
|
+
chat_id: str | None = None,
|
|
114
118
|
):
|
|
115
119
|
# Ensure the URL is a valid string
|
|
116
120
|
if not isinstance(content_id, str):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|