unique_sdk 0.10.42__py3-none-any.whl → 0.10.47__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/__init__.py +1 -0
- unique_sdk/api_resources/_content.py +1 -0
- unique_sdk/api_resources/_group.py +369 -0
- unique_sdk/api_resources/_space.py +60 -0
- unique_sdk/utils/chat_in_space.py +3 -2
- {unique_sdk-0.10.42.dist-info → unique_sdk-0.10.47.dist-info}/METADATA +117 -4
- {unique_sdk-0.10.42.dist-info → unique_sdk-0.10.47.dist-info}/RECORD +9 -8
- {unique_sdk-0.10.42.dist-info → unique_sdk-0.10.47.dist-info}/LICENSE +0 -0
- {unique_sdk-0.10.42.dist-info → unique_sdk-0.10.47.dist-info}/WHEEL +0 -0
unique_sdk/__init__.py
CHANGED
|
@@ -85,6 +85,7 @@ from unique_sdk.api_resources._embedding import Embeddings as Embeddings
|
|
|
85
85
|
from unique_sdk.api_resources._acronyms import Acronyms as Acronyms
|
|
86
86
|
from unique_sdk.api_resources._llm_models import LLMModels as LLMModels
|
|
87
87
|
from unique_sdk.api_resources._user import User as User
|
|
88
|
+
from unique_sdk.api_resources._group import Group as Group
|
|
88
89
|
from unique_sdk.api_resources._message_assessment import (
|
|
89
90
|
MessageAssessment as MessageAssessment,
|
|
90
91
|
)
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
from typing import (
|
|
2
|
+
ClassVar,
|
|
3
|
+
List,
|
|
4
|
+
Literal,
|
|
5
|
+
NotRequired,
|
|
6
|
+
Optional,
|
|
7
|
+
TypedDict,
|
|
8
|
+
Unpack,
|
|
9
|
+
cast,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from unique_sdk._api_resource import APIResource
|
|
13
|
+
from unique_sdk._request_options import RequestOptions
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Group(APIResource["Group"]):
|
|
17
|
+
OBJECT_NAME: ClassVar[Literal["group"]] = "group"
|
|
18
|
+
|
|
19
|
+
class GetParams(RequestOptions):
|
|
20
|
+
"""
|
|
21
|
+
Parameters for getting groups in a company.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
skip: NotRequired[Optional[int]]
|
|
25
|
+
take: NotRequired[Optional[int]]
|
|
26
|
+
name: NotRequired[Optional[str]]
|
|
27
|
+
|
|
28
|
+
class CreateParams(RequestOptions):
|
|
29
|
+
"""
|
|
30
|
+
Parameters for creating a group.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
name: str
|
|
34
|
+
externalId: NotRequired[Optional[str]]
|
|
35
|
+
parentId: NotRequired[Optional[str]]
|
|
36
|
+
|
|
37
|
+
class UpdateParams(RequestOptions):
|
|
38
|
+
"""
|
|
39
|
+
Parameters for updating a group.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
name: NotRequired[Optional[str]]
|
|
43
|
+
|
|
44
|
+
class AddUsersParams(RequestOptions):
|
|
45
|
+
"""
|
|
46
|
+
Parameters for adding users to a group.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
userIds: List[str]
|
|
50
|
+
|
|
51
|
+
class RemoveUsersParams(RequestOptions):
|
|
52
|
+
"""
|
|
53
|
+
Parameters for removing users from a group.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
userIds: List[str]
|
|
57
|
+
|
|
58
|
+
class GroupMember(TypedDict):
|
|
59
|
+
"""
|
|
60
|
+
Represents a member of a group.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
entityId: str
|
|
64
|
+
|
|
65
|
+
class GroupMembership(TypedDict):
|
|
66
|
+
"""
|
|
67
|
+
Represents a membership relationship between a user and a group.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
entityId: str
|
|
71
|
+
groupId: str
|
|
72
|
+
createdAt: str
|
|
73
|
+
|
|
74
|
+
class Group(TypedDict):
|
|
75
|
+
"""
|
|
76
|
+
Represents a group in the company.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
id: str
|
|
80
|
+
name: str
|
|
81
|
+
externalId: str
|
|
82
|
+
parentId: Optional[str]
|
|
83
|
+
members: Optional[List["Group.GroupMember"]]
|
|
84
|
+
createdAt: str
|
|
85
|
+
updatedAt: str
|
|
86
|
+
|
|
87
|
+
class Groups(TypedDict):
|
|
88
|
+
"""
|
|
89
|
+
Response for getting groups.
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
groups: List["Group.Group"]
|
|
93
|
+
|
|
94
|
+
class DeleteResponse(TypedDict):
|
|
95
|
+
"""
|
|
96
|
+
Response for deleting a group.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
id: str
|
|
100
|
+
|
|
101
|
+
class AddUsersToGroupResponse(TypedDict):
|
|
102
|
+
"""
|
|
103
|
+
Response for adding users to a group.
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
memberships: List["Group.GroupMembership"]
|
|
107
|
+
|
|
108
|
+
class RemoveUsersFromGroupResponse(TypedDict):
|
|
109
|
+
"""
|
|
110
|
+
Response for removing users from a group.
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
success: bool
|
|
114
|
+
|
|
115
|
+
@classmethod
|
|
116
|
+
def create_group(
|
|
117
|
+
cls,
|
|
118
|
+
user_id: str,
|
|
119
|
+
company_id: str,
|
|
120
|
+
**params: Unpack["Group.CreateParams"],
|
|
121
|
+
) -> "Group.Group":
|
|
122
|
+
"""
|
|
123
|
+
Create a group in a company.
|
|
124
|
+
"""
|
|
125
|
+
return cast(
|
|
126
|
+
"Group.Group",
|
|
127
|
+
cls._static_request(
|
|
128
|
+
"post",
|
|
129
|
+
"/groups",
|
|
130
|
+
user_id,
|
|
131
|
+
company_id,
|
|
132
|
+
params=params,
|
|
133
|
+
),
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
@classmethod
|
|
137
|
+
async def create_group_async(
|
|
138
|
+
cls,
|
|
139
|
+
user_id: str,
|
|
140
|
+
company_id: str,
|
|
141
|
+
**params: Unpack["Group.CreateParams"],
|
|
142
|
+
) -> "Group.Group":
|
|
143
|
+
"""
|
|
144
|
+
Async create a group in a company.
|
|
145
|
+
"""
|
|
146
|
+
return cast(
|
|
147
|
+
"Group.Group",
|
|
148
|
+
await cls._static_request_async(
|
|
149
|
+
"post",
|
|
150
|
+
"/groups",
|
|
151
|
+
user_id,
|
|
152
|
+
company_id,
|
|
153
|
+
params=params,
|
|
154
|
+
),
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
@classmethod
|
|
158
|
+
def get_groups(
|
|
159
|
+
cls,
|
|
160
|
+
user_id: str,
|
|
161
|
+
company_id: str,
|
|
162
|
+
**params: Unpack["Group.GetParams"],
|
|
163
|
+
) -> "Group.Groups":
|
|
164
|
+
"""
|
|
165
|
+
Get groups in a company.
|
|
166
|
+
"""
|
|
167
|
+
return cast(
|
|
168
|
+
"Group.Groups",
|
|
169
|
+
cls._static_request(
|
|
170
|
+
"get",
|
|
171
|
+
"/groups",
|
|
172
|
+
user_id,
|
|
173
|
+
company_id,
|
|
174
|
+
params=params,
|
|
175
|
+
),
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
@classmethod
|
|
179
|
+
async def get_groups_async(
|
|
180
|
+
cls,
|
|
181
|
+
user_id: str,
|
|
182
|
+
company_id: str,
|
|
183
|
+
**params: Unpack["Group.GetParams"],
|
|
184
|
+
) -> "Group.Groups":
|
|
185
|
+
"""
|
|
186
|
+
Async get groups in a company.
|
|
187
|
+
"""
|
|
188
|
+
return cast(
|
|
189
|
+
"Group.Groups",
|
|
190
|
+
await cls._static_request_async(
|
|
191
|
+
"get",
|
|
192
|
+
"/groups",
|
|
193
|
+
user_id,
|
|
194
|
+
company_id,
|
|
195
|
+
params=params,
|
|
196
|
+
),
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
@classmethod
|
|
200
|
+
def delete_group(
|
|
201
|
+
cls,
|
|
202
|
+
user_id: str,
|
|
203
|
+
company_id: str,
|
|
204
|
+
group_id: str,
|
|
205
|
+
) -> "Group.DeleteResponse":
|
|
206
|
+
"""
|
|
207
|
+
Delete a group in a company.
|
|
208
|
+
"""
|
|
209
|
+
return cast(
|
|
210
|
+
"Group.DeleteResponse",
|
|
211
|
+
cls._static_request(
|
|
212
|
+
"delete",
|
|
213
|
+
f"/groups/{group_id}",
|
|
214
|
+
user_id,
|
|
215
|
+
company_id,
|
|
216
|
+
),
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
@classmethod
|
|
220
|
+
async def delete_group_async(
|
|
221
|
+
cls,
|
|
222
|
+
user_id: str,
|
|
223
|
+
company_id: str,
|
|
224
|
+
group_id: str,
|
|
225
|
+
) -> "Group.DeleteResponse":
|
|
226
|
+
"""
|
|
227
|
+
Async delete a group in a company.
|
|
228
|
+
"""
|
|
229
|
+
return cast(
|
|
230
|
+
"Group.DeleteResponse",
|
|
231
|
+
await cls._static_request_async(
|
|
232
|
+
"delete",
|
|
233
|
+
f"/groups/{group_id}",
|
|
234
|
+
user_id,
|
|
235
|
+
company_id,
|
|
236
|
+
),
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
@classmethod
|
|
240
|
+
def update_group(
|
|
241
|
+
cls,
|
|
242
|
+
user_id: str,
|
|
243
|
+
company_id: str,
|
|
244
|
+
group_id: str,
|
|
245
|
+
**params: Unpack["Group.UpdateParams"],
|
|
246
|
+
) -> "Group.Group":
|
|
247
|
+
"""
|
|
248
|
+
Update a group in a company.
|
|
249
|
+
"""
|
|
250
|
+
return cast(
|
|
251
|
+
"Group.Group",
|
|
252
|
+
cls._static_request(
|
|
253
|
+
"patch",
|
|
254
|
+
f"/groups/{group_id}",
|
|
255
|
+
user_id,
|
|
256
|
+
company_id,
|
|
257
|
+
params=params,
|
|
258
|
+
),
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
@classmethod
|
|
262
|
+
async def update_group_async(
|
|
263
|
+
cls,
|
|
264
|
+
user_id: str,
|
|
265
|
+
company_id: str,
|
|
266
|
+
group_id: str,
|
|
267
|
+
**params: Unpack["Group.UpdateParams"],
|
|
268
|
+
) -> "Group.Group":
|
|
269
|
+
"""
|
|
270
|
+
Async update a group in a company.
|
|
271
|
+
"""
|
|
272
|
+
return cast(
|
|
273
|
+
"Group.Group",
|
|
274
|
+
await cls._static_request_async(
|
|
275
|
+
"patch",
|
|
276
|
+
f"/groups/{group_id}",
|
|
277
|
+
user_id,
|
|
278
|
+
company_id,
|
|
279
|
+
params=params,
|
|
280
|
+
),
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
@classmethod
|
|
284
|
+
def add_users_to_group(
|
|
285
|
+
cls,
|
|
286
|
+
user_id: str,
|
|
287
|
+
company_id: str,
|
|
288
|
+
group_id: str,
|
|
289
|
+
**params: Unpack["Group.AddUsersParams"],
|
|
290
|
+
) -> "Group.AddUsersToGroupResponse":
|
|
291
|
+
"""
|
|
292
|
+
Add users to a group in a company.
|
|
293
|
+
"""
|
|
294
|
+
return cast(
|
|
295
|
+
"Group.AddUsersToGroupResponse",
|
|
296
|
+
cls._static_request(
|
|
297
|
+
"post",
|
|
298
|
+
f"/groups/{group_id}/users",
|
|
299
|
+
user_id,
|
|
300
|
+
company_id,
|
|
301
|
+
params=params,
|
|
302
|
+
),
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
@classmethod
|
|
306
|
+
async def add_users_to_group_async(
|
|
307
|
+
cls,
|
|
308
|
+
user_id: str,
|
|
309
|
+
company_id: str,
|
|
310
|
+
group_id: str,
|
|
311
|
+
**params: Unpack["Group.AddUsersParams"],
|
|
312
|
+
) -> "Group.AddUsersToGroupResponse":
|
|
313
|
+
"""
|
|
314
|
+
Async add users to a group in a company.
|
|
315
|
+
"""
|
|
316
|
+
return cast(
|
|
317
|
+
"Group.AddUsersToGroupResponse",
|
|
318
|
+
await cls._static_request_async(
|
|
319
|
+
"post",
|
|
320
|
+
f"/groups/{group_id}/users",
|
|
321
|
+
user_id,
|
|
322
|
+
company_id,
|
|
323
|
+
params=params,
|
|
324
|
+
),
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
@classmethod
|
|
328
|
+
def remove_users_from_group(
|
|
329
|
+
cls,
|
|
330
|
+
user_id: str,
|
|
331
|
+
company_id: str,
|
|
332
|
+
group_id: str,
|
|
333
|
+
**params: Unpack["Group.RemoveUsersParams"],
|
|
334
|
+
) -> "Group.RemoveUsersFromGroupResponse":
|
|
335
|
+
"""
|
|
336
|
+
Remove users from a group in a company.
|
|
337
|
+
"""
|
|
338
|
+
return cast(
|
|
339
|
+
"Group.RemoveUsersFromGroupResponse",
|
|
340
|
+
cls._static_request(
|
|
341
|
+
"delete",
|
|
342
|
+
f"/groups/{group_id}/users",
|
|
343
|
+
user_id,
|
|
344
|
+
company_id,
|
|
345
|
+
params=params,
|
|
346
|
+
),
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
@classmethod
|
|
350
|
+
async def remove_users_from_group_async(
|
|
351
|
+
cls,
|
|
352
|
+
user_id: str,
|
|
353
|
+
company_id: str,
|
|
354
|
+
group_id: str,
|
|
355
|
+
**params: Unpack["Group.RemoveUsersParams"],
|
|
356
|
+
) -> "Group.RemoveUsersFromGroupResponse":
|
|
357
|
+
"""
|
|
358
|
+
Async remove users from a group in a company.
|
|
359
|
+
"""
|
|
360
|
+
return cast(
|
|
361
|
+
"Group.RemoveUsersFromGroupResponse",
|
|
362
|
+
await cls._static_request_async(
|
|
363
|
+
"delete",
|
|
364
|
+
f"/groups/{group_id}/users",
|
|
365
|
+
user_id,
|
|
366
|
+
company_id,
|
|
367
|
+
params=params,
|
|
368
|
+
),
|
|
369
|
+
)
|
|
@@ -29,6 +29,14 @@ class Space(APIResource["Space"]):
|
|
|
29
29
|
toolChoices: NotRequired[List[str] | None]
|
|
30
30
|
scopeRules: NotRequired[dict | None]
|
|
31
31
|
|
|
32
|
+
class GetChatMessagesParams(RequestOptions):
|
|
33
|
+
"""
|
|
34
|
+
Parameters for getting chat messages.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
skip: NotRequired[int]
|
|
38
|
+
take: NotRequired[int]
|
|
39
|
+
|
|
32
40
|
class Reference(TypedDict):
|
|
33
41
|
"""
|
|
34
42
|
Reference information for a message.
|
|
@@ -86,6 +94,14 @@ class Space(APIResource["Space"]):
|
|
|
86
94
|
|
|
87
95
|
chat_id: str
|
|
88
96
|
|
|
97
|
+
class GetAllMessagesResponse(TypedDict):
|
|
98
|
+
"""
|
|
99
|
+
Response for getting all messages in a chat.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
messages: List["Space.Message"]
|
|
103
|
+
totalCount: int
|
|
104
|
+
|
|
89
105
|
@classmethod
|
|
90
106
|
def create_message(
|
|
91
107
|
cls,
|
|
@@ -130,6 +146,50 @@ class Space(APIResource["Space"]):
|
|
|
130
146
|
),
|
|
131
147
|
)
|
|
132
148
|
|
|
149
|
+
@classmethod
|
|
150
|
+
def get_chat_messages(
|
|
151
|
+
cls,
|
|
152
|
+
user_id: str,
|
|
153
|
+
company_id: str,
|
|
154
|
+
chat_id: str,
|
|
155
|
+
**params: Unpack["Space.GetChatMessagesParams"],
|
|
156
|
+
) -> "Space.GetAllMessagesResponse":
|
|
157
|
+
"""
|
|
158
|
+
Get all messages in a space chat.
|
|
159
|
+
"""
|
|
160
|
+
return cast(
|
|
161
|
+
"Space.GetAllMessagesResponse",
|
|
162
|
+
cls._static_request(
|
|
163
|
+
"get",
|
|
164
|
+
f"/space/chat/{chat_id}/messages",
|
|
165
|
+
user_id,
|
|
166
|
+
company_id,
|
|
167
|
+
params=params,
|
|
168
|
+
),
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
@classmethod
|
|
172
|
+
async def get_chat_messages_async(
|
|
173
|
+
cls,
|
|
174
|
+
user_id: str,
|
|
175
|
+
company_id: str,
|
|
176
|
+
chat_id: str,
|
|
177
|
+
**params: Unpack["Space.GetChatMessagesParams"],
|
|
178
|
+
) -> "Space.GetAllMessagesResponse":
|
|
179
|
+
"""
|
|
180
|
+
Async get all messages in a space chat.
|
|
181
|
+
"""
|
|
182
|
+
return cast(
|
|
183
|
+
"Space.GetAllMessagesResponse",
|
|
184
|
+
await cls._static_request_async(
|
|
185
|
+
"get",
|
|
186
|
+
f"/space/chat/{chat_id}/messages",
|
|
187
|
+
user_id,
|
|
188
|
+
company_id,
|
|
189
|
+
params=params,
|
|
190
|
+
),
|
|
191
|
+
)
|
|
192
|
+
|
|
133
193
|
@classmethod
|
|
134
194
|
def get_latest_message(
|
|
135
195
|
cls, user_id: str, company_id: str, chat_id: str
|
|
@@ -76,6 +76,7 @@ async def chat_against_file(
|
|
|
76
76
|
text: str,
|
|
77
77
|
poll_interval: float = 1.0,
|
|
78
78
|
max_wait: float = 60.0,
|
|
79
|
+
should_delete_chat: bool = True,
|
|
79
80
|
) -> "Space.Message":
|
|
80
81
|
"""
|
|
81
82
|
Chat against a file by uploading it, sending a message and waiting for a reply.
|
|
@@ -140,8 +141,8 @@ async def chat_against_file(
|
|
|
140
141
|
print(f"Error during chat against file: {err}")
|
|
141
142
|
raise
|
|
142
143
|
finally:
|
|
143
|
-
if chat_id:
|
|
144
|
-
Space.
|
|
144
|
+
if chat_id and should_delete_chat:
|
|
145
|
+
await Space.delete_chat_async(
|
|
145
146
|
user_id=user_id,
|
|
146
147
|
company_id=company_id,
|
|
147
148
|
chat_id=chat_id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_sdk
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.47
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -44,6 +44,7 @@ The Unique Python SDK provides access to the public API of Unique AI. It also en
|
|
|
44
44
|
- [Space](#space)
|
|
45
45
|
- [LLM Models](#llm-models)
|
|
46
46
|
- [User](#user)
|
|
47
|
+
- [Group](#group)
|
|
47
48
|
- [Agentic Table](#agentic-table)
|
|
48
49
|
6. [UniqueQL](#uniqueql)
|
|
49
50
|
- [Query Structure](#uniqueql-query-structure)
|
|
@@ -264,6 +265,7 @@ unique_sdk.Message.modify(
|
|
|
264
265
|
- [Space](#space)
|
|
265
266
|
- [LLM Models](#llm-models)
|
|
266
267
|
- [User](#user)
|
|
268
|
+
- [Group](#group)
|
|
267
269
|
- [Agentic Table](#agentic-table)
|
|
268
270
|
|
|
269
271
|
Most of the API services provide an asynchronous version of the method. The async methods are suffixed with `_async`.
|
|
@@ -1390,6 +1392,20 @@ message = unique_sdk.Space.create_message(
|
|
|
1390
1392
|
)
|
|
1391
1393
|
```
|
|
1392
1394
|
|
|
1395
|
+
#### `unique_sdk.Space.get_chat_messages` (Compatible with release >.48)
|
|
1396
|
+
|
|
1397
|
+
Get all messages in a space chat. Returns a list of paginated messages in the specified chat.
|
|
1398
|
+
|
|
1399
|
+
```python
|
|
1400
|
+
messages = unique_sdk.Space.get_chat_messages(
|
|
1401
|
+
user_id=user_id,
|
|
1402
|
+
company_id=company_id,
|
|
1403
|
+
chat_id="chat_dejfhe729br398",
|
|
1404
|
+
skip=0, # Optional (defaults to 0) - number of messages to skip for pagination
|
|
1405
|
+
take=50, # Optional (defaults to 10) - number of messages to return
|
|
1406
|
+
)
|
|
1407
|
+
```
|
|
1408
|
+
|
|
1393
1409
|
#### `unique_sdk.Space.get_latest_message`
|
|
1394
1410
|
|
|
1395
1411
|
Get the latest message in a space chat.
|
|
@@ -1445,6 +1461,87 @@ users = unique_sdk.User.get_users(
|
|
|
1445
1461
|
)
|
|
1446
1462
|
```
|
|
1447
1463
|
|
|
1464
|
+
### Group
|
|
1465
|
+
|
|
1466
|
+
#### `unique_sdk.Group.create_group` (Compatible with release >.48)
|
|
1467
|
+
|
|
1468
|
+
Create a new group in a company. You can specify the group name (required), external ID and parent group ID.
|
|
1469
|
+
|
|
1470
|
+
```python
|
|
1471
|
+
group = unique_sdk.Group.create_group(
|
|
1472
|
+
user_id=user_id,
|
|
1473
|
+
company_id=company_id,
|
|
1474
|
+
name="New Group", # Required - the name of the group
|
|
1475
|
+
externalId="ext_123", # Optional - external ID for the group
|
|
1476
|
+
parentId="group_a9cs7wr2z1bg2sxczvltgjch", # Optional - parent group ID
|
|
1477
|
+
)
|
|
1478
|
+
```
|
|
1479
|
+
|
|
1480
|
+
#### `unique_sdk.Group.get_groups` (Compatible with release >.48)
|
|
1481
|
+
|
|
1482
|
+
Get groups in a company. You can filter by name and use pagination with skip and take parameters.
|
|
1483
|
+
|
|
1484
|
+
```python
|
|
1485
|
+
groups = unique_sdk.Group.get_groups(
|
|
1486
|
+
user_id=user_id,
|
|
1487
|
+
company_id=company_id,
|
|
1488
|
+
skip=0, # Optional - number of records to skip for pagination
|
|
1489
|
+
take=50, # Optional - number of records to return (max 1000)
|
|
1490
|
+
name="Admin", # Optional - filter by group name
|
|
1491
|
+
)
|
|
1492
|
+
```
|
|
1493
|
+
|
|
1494
|
+
#### `unique_sdk.Group.update_group` (Compatible with release >.48)
|
|
1495
|
+
|
|
1496
|
+
Update a group in a company. You can update the group's name.
|
|
1497
|
+
|
|
1498
|
+
```python
|
|
1499
|
+
updated_group = unique_sdk.Group.update_group(
|
|
1500
|
+
user_id=user_id,
|
|
1501
|
+
company_id=company_id,
|
|
1502
|
+
group_id="group_a9cs7wr2z1bg2sxczvltgjch",
|
|
1503
|
+
name="New Group Name", # Optional - update the group name
|
|
1504
|
+
)
|
|
1505
|
+
```
|
|
1506
|
+
|
|
1507
|
+
#### `unique_sdk.Group.add_users_to_group` (Compatible with release >.48)
|
|
1508
|
+
|
|
1509
|
+
Add users to a group. Provide an array of user IDs to add as members to the specified group.
|
|
1510
|
+
|
|
1511
|
+
```python
|
|
1512
|
+
result = unique_sdk.Group.add_users_to_group(
|
|
1513
|
+
user_id=user_id,
|
|
1514
|
+
company_id=company_id,
|
|
1515
|
+
group_id="group_a9cs7wr2z1bg2sxczvltgjch",
|
|
1516
|
+
userIds=["299420877169688584", "325402458132058201", "299426678160031752"], # Required - array of user IDs to add
|
|
1517
|
+
)
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1520
|
+
#### `unique_sdk.Group.remove_users_from_group` (Compatible with release >.48)
|
|
1521
|
+
|
|
1522
|
+
Remove users from a group. Provide an array of user IDs to remove from the specified group.
|
|
1523
|
+
|
|
1524
|
+
```python
|
|
1525
|
+
result = unique_sdk.Group.remove_users_from_group(
|
|
1526
|
+
user_id=user_id,
|
|
1527
|
+
company_id=company_id,
|
|
1528
|
+
group_id="group_a9cs7wr2z1bg2sxczvltgjch",
|
|
1529
|
+
userIds=["299426678160031752", "299426678160031752"], # Required - array of user IDs to remove
|
|
1530
|
+
)
|
|
1531
|
+
```
|
|
1532
|
+
|
|
1533
|
+
#### `unique_sdk.Group.delete_group` (Compatible with release >.48)
|
|
1534
|
+
|
|
1535
|
+
Delete a group in a company by its group ID.
|
|
1536
|
+
|
|
1537
|
+
```python
|
|
1538
|
+
result = unique_sdk.Group.delete_group(
|
|
1539
|
+
user_id=user_id,
|
|
1540
|
+
company_id=company_id,
|
|
1541
|
+
group_id="group_a9cs7wr2z1bg2sxczvltgjch",
|
|
1542
|
+
)
|
|
1543
|
+
```
|
|
1544
|
+
|
|
1448
1545
|
### Agentic Table
|
|
1449
1546
|
|
|
1450
1547
|
The Agentic Table (Magic Table) API provides functionality for managing interactive tables with AI-powered cells, activity tracking, and metadata management.
|
|
@@ -1989,11 +2086,12 @@ You must provide the following parameters:
|
|
|
1989
2086
|
- `mime_type`: The mime type of the ifle to be uploaded.
|
|
1990
2087
|
- `text`: The text to be sent to the chat for chatting against the file.
|
|
1991
2088
|
|
|
1992
|
-
The script creates a chat and uploads the file to it. It then keeps polling the `ingestionState` field of the message, waiting for it to reach `FINISHED`, signaling the upload is complete. Once the file uploads successfully, the script sends the text, continues polling for completion, and finally retrieves the response message.
|
|
2089
|
+
The script creates a chat and uploads the file to it. It then keeps polling the `ingestionState` field of the message, waiting for it to reach `FINISHED`, signaling the upload is complete. Once the file uploads successfully, the script sends the text, continues polling for completion, and finally retrieves the response message. The function deletes the chat at the end unless the `should_delete_chat` is set to false.
|
|
1993
2090
|
|
|
1994
2091
|
**Optional parameters:**
|
|
1995
2092
|
- `poll_interval`: The number of seconds to wait between polling attempts (default: `1` second).
|
|
1996
2093
|
- `max_wait`: The maximum number of seconds to wait for the message to complete (default: `60` seconds).
|
|
2094
|
+
- `should_delete_chat`: Setting this flag determines whether the chat should be deleted at the end or not. Default is True.
|
|
1997
2095
|
|
|
1998
2096
|
Example of chatting against a PDF. (The usage can be extended to any supported file type)
|
|
1999
2097
|
|
|
@@ -2003,8 +2101,8 @@ latest_message = await unique_sdk.utils.chat_in_space.chat_against_file(
|
|
|
2003
2101
|
company_id=company_id,
|
|
2004
2102
|
assistant_id="assistant_hjcdga64bkcjnhu4",
|
|
2005
2103
|
path_to_file="/files/hello.pdf",
|
|
2006
|
-
displayed_filename="hello.pdf"
|
|
2007
|
-
mime_type="application/pdf"
|
|
2104
|
+
displayed_filename="hello.pdf",
|
|
2105
|
+
mime_type="application/pdf",
|
|
2008
2106
|
text="Give me a bullet point summary of the file.",
|
|
2009
2107
|
)
|
|
2010
2108
|
```
|
|
@@ -2050,6 +2148,21 @@ All notable changes to this project will be documented in this file.
|
|
|
2050
2148
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
2051
2149
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
2052
2150
|
|
|
2151
|
+
## [0.10.47] - 2025-11-19
|
|
2152
|
+
- Add expired/s at fields on content search result.
|
|
2153
|
+
|
|
2154
|
+
## [0.10.46] - 2025-11-18
|
|
2155
|
+
- chat_against_file function allows now a should_delete_chat flag.
|
|
2156
|
+
|
|
2157
|
+
## [0.10.45] - 2025-11-18
|
|
2158
|
+
- Create group and manage users functions.
|
|
2159
|
+
|
|
2160
|
+
## [0.10.44] - 2025-11-18
|
|
2161
|
+
- add function to get all messages in a chat.
|
|
2162
|
+
|
|
2163
|
+
## [0.10.43] - 2025-11-14
|
|
2164
|
+
- Add get, delete and update groups functions.
|
|
2165
|
+
|
|
2053
2166
|
## [0.10.42] - 2025-11-14
|
|
2054
2167
|
- Add get_users function.
|
|
2055
2168
|
|
|
@@ -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
|
|
@@ -17,10 +17,11 @@ unique_sdk/api_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
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
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=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
23
|
unique_sdk/api_resources/_folder.py,sha256=WPyRPsdAE62tU7p4hEYiVB4OoArv_60b8t4j7hgrJKk,15765
|
|
24
|
+
unique_sdk/api_resources/_group.py,sha256=KnuUkk9RxNPLTMBShCxJxNKcfx90yogt4BNoGU5lmRk,8685
|
|
24
25
|
unique_sdk/api_resources/_integrated.py,sha256=O8e673z-RB7FRFMQYn_YEuHijebr5W7KJxkUnymbBZk,6164
|
|
25
26
|
unique_sdk/api_resources/_llm_models.py,sha256=3Jn6MpxWgZ43Hze8JHd4_n27si5xmwd3JE8r8cEZq_M,1640
|
|
26
27
|
unique_sdk/api_resources/_mcp.py,sha256=zKh0dyn0QnkKk57N2zlGVN_GQoxEp5T2CS38vVm6jQY,3341
|
|
@@ -31,14 +32,14 @@ unique_sdk/api_resources/_message_log.py,sha256=_DifZ4Di7uKyzkP0i8rwu5IIiYZPCBp5
|
|
|
31
32
|
unique_sdk/api_resources/_search.py,sha256=GQItZKoGNOVZfkLLltBmsRZYBIreRKU0lGW8Kgpj1_Q,1959
|
|
32
33
|
unique_sdk/api_resources/_search_string.py,sha256=LZz2_QPZXV1NXucRR06dnDC2miK7J8XBY7dXX2xoDY4,1610
|
|
33
34
|
unique_sdk/api_resources/_short_term_memory.py,sha256=vPRN-Y0WPx74E6y-A3LocGc0TxJdzT-xGL66WzZwKRg,2820
|
|
34
|
-
unique_sdk/api_resources/_space.py,sha256=
|
|
35
|
+
unique_sdk/api_resources/_space.py,sha256=yQGoK3o8YbaEdoJvrWzx97Rbx_kdhRKNVsE1jdw_a5E,6580
|
|
35
36
|
unique_sdk/api_resources/_user.py,sha256=u59Hgq9i-QhYlqIYgk-KE7OeSx5xuNVo_gUgDpZTLcI,1974
|
|
36
37
|
unique_sdk/utils/chat_history.py,sha256=5UqL9hF1O9pV7skbNOlEibF5rHdYsmG3m5-YEPUowOs,3037
|
|
37
|
-
unique_sdk/utils/chat_in_space.py,sha256=
|
|
38
|
+
unique_sdk/utils/chat_in_space.py,sha256=e_Ny03eB7Q8oijdUR_sPlFTIgq2rsCbSR-Sin8jnxM8,6066
|
|
38
39
|
unique_sdk/utils/file_io.py,sha256=lskRULIh7qExK26o_1YqRs0f5mqJHTS9m_mdxlsVo4s,4497
|
|
39
40
|
unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
|
|
40
41
|
unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
|
|
41
|
-
unique_sdk-0.10.
|
|
42
|
-
unique_sdk-0.10.
|
|
43
|
-
unique_sdk-0.10.
|
|
44
|
-
unique_sdk-0.10.
|
|
42
|
+
unique_sdk-0.10.47.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
|
43
|
+
unique_sdk-0.10.47.dist-info/METADATA,sha256=EwP9zbqw4sD462AvIvxAElpPxcbtdY27fePcUE9SdOY,74141
|
|
44
|
+
unique_sdk-0.10.47.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
45
|
+
unique_sdk-0.10.47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|