unique_sdk 0.9.42__tar.gz → 0.10.1__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.9.42 → unique_sdk-0.10.1}/CHANGELOG.md +6 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/PKG-INFO +23 -1
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/README.md +16 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/pyproject.toml +1 -1
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/__init__.py +1 -0
- unique_sdk-0.10.1/unique_sdk/api_resources/_mcp.py +118 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_space.py +47 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/LICENSE +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_api_requestor.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_api_resource.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_api_version.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_error.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_http_client.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_list_object.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_object_classes.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_request_options.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_unique_object.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_unique_ql.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_unique_response.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_util.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_version.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/_webhook.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/__init__.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_acronyms.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_chat_completion.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_content.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_embedding.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_event.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_folder.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_integrated.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_message.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_message_assessment.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_search.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_search_string.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/api_resources/_short_term_memory.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/utils/chat_history.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/utils/chat_in_space.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/utils/file_io.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/unique_sdk/utils/sources.py +0 -0
- {unique_sdk-0.9.42 → unique_sdk-0.10.1}/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.1] - 2025-08-05
|
|
9
|
+
- Allow deletion of a space chat.
|
|
10
|
+
|
|
11
|
+
## [0.10.0] - 2025-08-04
|
|
12
|
+
- Add MCP support
|
|
13
|
+
|
|
8
14
|
## [0.9.42] - 2025-07-31
|
|
9
15
|
- Fix wrong chat in space example.
|
|
10
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.1
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -37,6 +37,7 @@ The Unique Python SDK provides access to the public API of Unique FinanceGPT. It
|
|
|
37
37
|
- [Short Term Memory](#short-term-memory)
|
|
38
38
|
- [Message Assessment](#message-assessment)
|
|
39
39
|
- [Folder](#folder)
|
|
40
|
+
- [Space](#space)
|
|
40
41
|
6. [UniqueQL](#uniqueql)
|
|
41
42
|
- [Query Structure](#uniqueql-query-structure)
|
|
42
43
|
- [Metadata Filtering](#metadata-filtering)
|
|
@@ -251,6 +252,7 @@ unique_sdk.Message.modify(
|
|
|
251
252
|
- [Short Term Memory](#short-term-memory)
|
|
252
253
|
- [Message Assessment](#message-assessment)
|
|
253
254
|
- [Folder](#folder)
|
|
255
|
+
- [Space](#space)
|
|
254
256
|
|
|
255
257
|
Most of the API services provide an asynchronous version of the method. The async methods are suffixed with `_async`.
|
|
256
258
|
|
|
@@ -950,6 +952,20 @@ unique_sdk.Folder.remove_access(
|
|
|
950
952
|
)
|
|
951
953
|
```
|
|
952
954
|
|
|
955
|
+
### Space
|
|
956
|
+
|
|
957
|
+
#### `unique_sdk.Space.delete_chat`
|
|
958
|
+
|
|
959
|
+
Delete a space chat by id. If the chat does not exist, the function will return an error.
|
|
960
|
+
|
|
961
|
+
```python
|
|
962
|
+
unique_sdk.Space.delete_chat(
|
|
963
|
+
user_id=user_id,
|
|
964
|
+
company_id=company_id,
|
|
965
|
+
chat_id="chat_dejfhe729br398",
|
|
966
|
+
)
|
|
967
|
+
```
|
|
968
|
+
|
|
953
969
|
## UniqueQL
|
|
954
970
|
|
|
955
971
|
[UniqueQL](https://unique-ch.atlassian.net/wiki/x/coAXHQ) is an advanced query language designed to enhance search capabilities within various search modes such as Vector, Full-Text Search (FTS), and Combined. This query language enables users to perform detailed searches by filtering through metadata attributes like filenames, URLs, dates, and more. UniqueQL is versatile and can be translated into different query formats for various database systems, including PostgreSQL and Qdrant.
|
|
@@ -1283,6 +1299,12 @@ All notable changes to this project will be documented in this file.
|
|
|
1283
1299
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
1284
1300
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
1285
1301
|
|
|
1302
|
+
## [0.10.1] - 2025-08-05
|
|
1303
|
+
- Allow deletion of a space chat.
|
|
1304
|
+
|
|
1305
|
+
## [0.10.0] - 2025-08-04
|
|
1306
|
+
- Add MCP support
|
|
1307
|
+
|
|
1286
1308
|
## [0.9.42] - 2025-07-31
|
|
1287
1309
|
- Fix wrong chat in space example.
|
|
1288
1310
|
|
|
@@ -21,6 +21,7 @@ The Unique Python SDK provides access to the public API of Unique FinanceGPT. It
|
|
|
21
21
|
- [Short Term Memory](#short-term-memory)
|
|
22
22
|
- [Message Assessment](#message-assessment)
|
|
23
23
|
- [Folder](#folder)
|
|
24
|
+
- [Space](#space)
|
|
24
25
|
6. [UniqueQL](#uniqueql)
|
|
25
26
|
- [Query Structure](#uniqueql-query-structure)
|
|
26
27
|
- [Metadata Filtering](#metadata-filtering)
|
|
@@ -235,6 +236,7 @@ unique_sdk.Message.modify(
|
|
|
235
236
|
- [Short Term Memory](#short-term-memory)
|
|
236
237
|
- [Message Assessment](#message-assessment)
|
|
237
238
|
- [Folder](#folder)
|
|
239
|
+
- [Space](#space)
|
|
238
240
|
|
|
239
241
|
Most of the API services provide an asynchronous version of the method. The async methods are suffixed with `_async`.
|
|
240
242
|
|
|
@@ -934,6 +936,20 @@ unique_sdk.Folder.remove_access(
|
|
|
934
936
|
)
|
|
935
937
|
```
|
|
936
938
|
|
|
939
|
+
### Space
|
|
940
|
+
|
|
941
|
+
#### `unique_sdk.Space.delete_chat`
|
|
942
|
+
|
|
943
|
+
Delete a space chat by id. If the chat does not exist, the function will return an error.
|
|
944
|
+
|
|
945
|
+
```python
|
|
946
|
+
unique_sdk.Space.delete_chat(
|
|
947
|
+
user_id=user_id,
|
|
948
|
+
company_id=company_id,
|
|
949
|
+
chat_id="chat_dejfhe729br398",
|
|
950
|
+
)
|
|
951
|
+
```
|
|
952
|
+
|
|
937
953
|
## UniqueQL
|
|
938
954
|
|
|
939
955
|
[UniqueQL](https://unique-ch.atlassian.net/wiki/x/coAXHQ) is an advanced query language designed to enhance search capabilities within various search modes such as Vector, Full-Text Search (FTS), and Combined. This query language enables users to perform detailed searches by filtering through metadata attributes like filenames, URLs, dates, and more. UniqueQL is versatile and can be translated into different query formats for various database systems, including PostgreSQL and Qdrant.
|
|
@@ -87,6 +87,7 @@ from unique_sdk.api_resources._message_assessment import (
|
|
|
87
87
|
MessageAssessment as MessageAssessment,
|
|
88
88
|
)
|
|
89
89
|
from unique_sdk.api_resources._space import Space as Space
|
|
90
|
+
from unique_sdk.api_resources._mcp import MCP as MCP
|
|
90
91
|
|
|
91
92
|
# Unique QL
|
|
92
93
|
from unique_sdk._unique_ql import UQLOperator as UQLOperator
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
from typing import (
|
|
2
|
+
Any,
|
|
3
|
+
ClassVar,
|
|
4
|
+
Dict,
|
|
5
|
+
List,
|
|
6
|
+
Literal,
|
|
7
|
+
Optional,
|
|
8
|
+
TypedDict,
|
|
9
|
+
Union,
|
|
10
|
+
Unpack,
|
|
11
|
+
cast,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
from typing_extensions import NotRequired
|
|
15
|
+
|
|
16
|
+
from unique_sdk._api_resource import APIResource
|
|
17
|
+
from unique_sdk._request_options import RequestOptions
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CallToolTextResourceDto(TypedDict):
|
|
21
|
+
"""Text resource containing URI, optional MIME type, and text content."""
|
|
22
|
+
uri: str
|
|
23
|
+
mimeType: Optional[str]
|
|
24
|
+
text: str
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CallToolBlobResourceDto(TypedDict):
|
|
28
|
+
"""Blob resource containing URI, optional MIME type, and base64-encoded content."""
|
|
29
|
+
uri: str
|
|
30
|
+
mimeType: Optional[str]
|
|
31
|
+
blob: str
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class CallToolContentDto(TypedDict):
|
|
35
|
+
"""Content returned by an MCP tool call."""
|
|
36
|
+
type: Literal["text", "image", "audio", "resource_link", "resource"]
|
|
37
|
+
|
|
38
|
+
# Optional fields for different content types
|
|
39
|
+
text: NotRequired[Optional[str]] # For type: "text"
|
|
40
|
+
data: NotRequired[Optional[str]] # Base64 data for type: "image" or "audio"
|
|
41
|
+
mimeType: NotRequired[Optional[str]] # For type: "image", "audio", or "resource_link"
|
|
42
|
+
uri: NotRequired[Optional[str]] # For type: "resource_link"
|
|
43
|
+
name: NotRequired[Optional[str]] # For type: "resource_link"
|
|
44
|
+
description: NotRequired[Optional[str]] # For type: "resource_link"
|
|
45
|
+
resource: NotRequired[Optional[Union[CallToolTextResourceDto, CallToolBlobResourceDto]]] # For type: "resource"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class MCP(APIResource["MCP"]):
|
|
49
|
+
OBJECT_NAME: ClassVar[Literal["mcp.call_tool"]] = "mcp.call_tool"
|
|
50
|
+
|
|
51
|
+
class CallToolParams(RequestOptions):
|
|
52
|
+
"""Parameters for calling an MCP tool."""
|
|
53
|
+
name: str
|
|
54
|
+
arguments: Dict[str, Any]
|
|
55
|
+
|
|
56
|
+
# Response fields
|
|
57
|
+
content: List[CallToolContentDto]
|
|
58
|
+
isError: bool
|
|
59
|
+
mcpServerId: str
|
|
60
|
+
name: str
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def call_tool(
|
|
64
|
+
cls,
|
|
65
|
+
user_id: str,
|
|
66
|
+
company_id: str,
|
|
67
|
+
**params: Unpack["MCP.CallToolParams"],
|
|
68
|
+
) -> "MCP":
|
|
69
|
+
"""
|
|
70
|
+
Call an MCP tool with the specified name and arguments.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
user_id: The ID of the user making the request
|
|
74
|
+
company_id: The ID of the company
|
|
75
|
+
**params: Tool parameters including name and arguments
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
MCP: The response from the MCP tool call
|
|
79
|
+
"""
|
|
80
|
+
return cast(
|
|
81
|
+
"MCP",
|
|
82
|
+
cls._static_request(
|
|
83
|
+
"post",
|
|
84
|
+
"/mcp/call-tool",
|
|
85
|
+
user_id,
|
|
86
|
+
company_id,
|
|
87
|
+
params=params,
|
|
88
|
+
),
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
async def call_tool_async(
|
|
93
|
+
cls,
|
|
94
|
+
user_id: str,
|
|
95
|
+
company_id: str,
|
|
96
|
+
**params: Unpack["MCP.CallToolParams"],
|
|
97
|
+
) -> "MCP":
|
|
98
|
+
"""
|
|
99
|
+
Asynchronously call an MCP tool with the specified name and arguments.
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
user_id: The ID of the user making the request
|
|
103
|
+
company_id: The ID of the company
|
|
104
|
+
**params: Tool parameters including name and arguments
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
MCP: The response from the MCP tool call
|
|
108
|
+
"""
|
|
109
|
+
return cast(
|
|
110
|
+
"MCP",
|
|
111
|
+
await cls._static_request_async(
|
|
112
|
+
"post",
|
|
113
|
+
"/mcp/call-tool",
|
|
114
|
+
user_id,
|
|
115
|
+
company_id,
|
|
116
|
+
params=params,
|
|
117
|
+
),
|
|
118
|
+
)
|
|
@@ -67,6 +67,13 @@ class Space(APIResource["Space"]):
|
|
|
67
67
|
assessment: Optional[List["Space.Reference"]]
|
|
68
68
|
messageAssessment: Optional[List["Space.Assessment"]]
|
|
69
69
|
|
|
70
|
+
class DeleteChatResponse(TypedDict):
|
|
71
|
+
"""
|
|
72
|
+
Response for deleting a chat in a space.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
chat_id: str
|
|
76
|
+
|
|
70
77
|
@classmethod
|
|
71
78
|
def create_message(
|
|
72
79
|
cls,
|
|
@@ -142,3 +149,43 @@ class Space(APIResource["Space"]):
|
|
|
142
149
|
company_id,
|
|
143
150
|
),
|
|
144
151
|
)
|
|
152
|
+
|
|
153
|
+
@classmethod
|
|
154
|
+
def delete_chat(
|
|
155
|
+
cls,
|
|
156
|
+
user_id: str,
|
|
157
|
+
company_id: str,
|
|
158
|
+
chat_id: str,
|
|
159
|
+
) -> "Space.DeleteChatResponse":
|
|
160
|
+
"""
|
|
161
|
+
Delete a chat in a space.
|
|
162
|
+
"""
|
|
163
|
+
return cast(
|
|
164
|
+
"Space.DeleteChatResponse",
|
|
165
|
+
cls._static_request(
|
|
166
|
+
"delete",
|
|
167
|
+
f"/space/chat/{chat_id}",
|
|
168
|
+
user_id,
|
|
169
|
+
company_id,
|
|
170
|
+
),
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
@classmethod
|
|
174
|
+
async def delete_chat_async(
|
|
175
|
+
cls,
|
|
176
|
+
user_id: str,
|
|
177
|
+
company_id: str,
|
|
178
|
+
chat_id: str,
|
|
179
|
+
) -> "Space.DeleteChatResponse":
|
|
180
|
+
"""
|
|
181
|
+
Async delete a chat in a space.
|
|
182
|
+
"""
|
|
183
|
+
return cast(
|
|
184
|
+
"Space.DeleteChatResponse",
|
|
185
|
+
await cls._static_request_async(
|
|
186
|
+
"delete",
|
|
187
|
+
f"/space/chat/{chat_id}",
|
|
188
|
+
user_id,
|
|
189
|
+
company_id,
|
|
190
|
+
),
|
|
191
|
+
)
|
|
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
|
|
File without changes
|