unique_sdk 0.10.36__tar.gz → 0.10.47__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.
Files changed (46) hide show
  1. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/CHANGELOG.md +33 -0
  2. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/PKG-INFO +209 -4
  3. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/README.md +175 -3
  4. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/pyproject.toml +2 -1
  5. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/__init__.py +3 -0
  6. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_content.py +19 -10
  7. unique_sdk-0.10.47/unique_sdk/api_resources/_group.py +369 -0
  8. unique_sdk-0.10.47/unique_sdk/api_resources/_llm_models.py +64 -0
  9. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_message.py +38 -0
  10. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_message_log.py +28 -3
  11. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_space.py +63 -2
  12. unique_sdk-0.10.47/unique_sdk/api_resources/_user.py +91 -0
  13. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/utils/chat_in_space.py +3 -2
  14. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/utils/file_io.py +4 -0
  15. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/LICENSE +0 -0
  16. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_api_requestor.py +0 -0
  17. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_api_resource.py +0 -0
  18. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_api_version.py +0 -0
  19. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_error.py +0 -0
  20. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_http_client.py +0 -0
  21. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_list_object.py +0 -0
  22. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_object_classes.py +0 -0
  23. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_request_options.py +0 -0
  24. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_unique_object.py +0 -0
  25. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_unique_ql.py +0 -0
  26. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_unique_response.py +0 -0
  27. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_util.py +0 -0
  28. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_version.py +0 -0
  29. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/_webhook.py +0 -0
  30. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/__init__.py +0 -0
  31. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_acronyms.py +0 -0
  32. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_agentic_table.py +0 -0
  33. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_chat_completion.py +0 -0
  34. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_embedding.py +0 -0
  35. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_event.py +0 -0
  36. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_folder.py +0 -0
  37. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_integrated.py +0 -0
  38. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_mcp.py +0 -0
  39. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_message_assessment.py +0 -0
  40. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_message_execution.py +0 -0
  41. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_search.py +0 -0
  42. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_search_string.py +0 -0
  43. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/api_resources/_short_term_memory.py +0 -0
  44. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/utils/chat_history.py +0 -0
  45. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/utils/sources.py +0 -0
  46. {unique_sdk-0.10.36 → unique_sdk-0.10.47}/unique_sdk/utils/token.py +0 -0
@@ -5,6 +5,39 @@ 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.47] - 2025-11-19
9
+ - Add expired/s at fields on content search result.
10
+
11
+ ## [0.10.46] - 2025-11-18
12
+ - chat_against_file function allows now a should_delete_chat flag.
13
+
14
+ ## [0.10.45] - 2025-11-18
15
+ - Create group and manage users functions.
16
+
17
+ ## [0.10.44] - 2025-11-18
18
+ - add function to get all messages in a chat.
19
+
20
+ ## [0.10.43] - 2025-11-14
21
+ - Add get, delete and update groups functions.
22
+
23
+ ## [0.10.42] - 2025-11-14
24
+ - Add get_users function.
25
+
26
+ ## [0.10.41] - 2025-11-13
27
+ - Add create_message and get_latest_message.
28
+
29
+ ## [0.10.40] - 2025-11-10
30
+ - Don't send description if not defined.
31
+
32
+ ## [0.10.39] - 2025-11-07
33
+ - Add function to get llm models
34
+
35
+ ## [0.10.38] - 2025-11-06
36
+ - Add description property to Reference and Content.
37
+
38
+ ## [0.10.37] - 2025-11-04
39
+ - Introduce local integration tests for Content API Resource
40
+
8
41
  ## [0.10.36] - 2025-11-04
9
42
  - Introduce local integration tests for Folder API Resource
10
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_sdk
3
- Version: 0.10.36
3
+ Version: 0.10.47
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -42,6 +42,9 @@ The Unique Python SDK provides access to the public API of Unique AI. It also en
42
42
  - [Message Assessment](#message-assessment)
43
43
  - [Folder](#folder)
44
44
  - [Space](#space)
45
+ - [LLM Models](#llm-models)
46
+ - [User](#user)
47
+ - [Group](#group)
45
48
  - [Agentic Table](#agentic-table)
46
49
  6. [UniqueQL](#uniqueql)
47
50
  - [Query Structure](#uniqueql-query-structure)
@@ -260,6 +263,9 @@ unique_sdk.Message.modify(
260
263
  - [Message Assessment](#message-assessment)
261
264
  - [Folder](#folder)
262
265
  - [Space](#space)
266
+ - [LLM Models](#llm-models)
267
+ - [User](#user)
268
+ - [Group](#group)
263
269
  - [Agentic Table](#agentic-table)
264
270
 
265
271
  Most of the API services provide an asynchronous version of the method. The async methods are suffixed with `_async`.
@@ -477,6 +483,7 @@ def upload_file(
477
483
  path_to_file,
478
484
  displayed_filename,
479
485
  mimeType,
486
+ description=None,
480
487
  scope_or_unique_path,
481
488
  ingestion_config=None,
482
489
  metadata=None,
@@ -489,6 +496,7 @@ def upload_file(
489
496
  "key": displayed_filename,
490
497
  "title": displayed_filename,
491
498
  "mimeType": mimeType,
499
+ "description": description,
492
500
  "ingestionConfig": ingestionConfig,
493
501
  "metadata": metadata,
494
502
  },
@@ -515,6 +523,7 @@ def upload_file(
515
523
  "key": displayed_filename,
516
524
  "title": displayed_filename,
517
525
  "mimeType": mimeType,
526
+ "description": description,
518
527
  "byteSize": size,
519
528
  "ingestionConfig": ingestionConfig,
520
529
  "metadata": metadata,
@@ -1359,6 +1368,56 @@ unique_sdk.Folder.delete(
1359
1368
 
1360
1369
  ### Space
1361
1370
 
1371
+ #### `unique_sdk.Space.create_message`
1372
+
1373
+ Send a message in a space. You can optionally provide a chat ID to continue an existing conversation, or omit it to start a new chat.
1374
+
1375
+ ```python
1376
+ message = unique_sdk.Space.create_message(
1377
+ user_id=user_id,
1378
+ company_id=company_id,
1379
+ chatId="chat_dejfhe729br398", # Optional - if not provided, a new chat will be created
1380
+ assistantId="assistant_abc123",
1381
+ text="Hello, how can you help me?",
1382
+ toolChoices=["WebSearch"], # Optional - list of tools to use
1383
+ scopeRules={ # Optional - scope rules for filtering
1384
+ "or": [
1385
+ {
1386
+ "operator": "contains",
1387
+ "path": ["folderIdPath"],
1388
+ "value": "uniquepathid://scope_123"
1389
+ }
1390
+ ]
1391
+ },
1392
+ )
1393
+ ```
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
+
1409
+ #### `unique_sdk.Space.get_latest_message`
1410
+
1411
+ Get the latest message in a space chat.
1412
+
1413
+ ```python
1414
+ message = unique_sdk.Space.get_latest_message(
1415
+ user_id=user_id,
1416
+ company_id=company_id,
1417
+ chat_id="chat_dejfhe729br398",
1418
+ )
1419
+ ```
1420
+
1362
1421
  #### `unique_sdk.Space.delete_chat`
1363
1422
 
1364
1423
  Delete a space chat by id. If the chat does not exist, the function will return an error.
@@ -1371,6 +1430,118 @@ unique_sdk.Space.delete_chat(
1371
1430
  )
1372
1431
  ```
1373
1432
 
1433
+ ### LLM Models
1434
+
1435
+ #### `unique_sdk.LLMModels.get` (Compatible with release >.46)
1436
+
1437
+ Get available LLM models. You can optionally filter by module and skip cache to fetch fresh data.
1438
+
1439
+ ```python
1440
+ models = unique_sdk.LLMModels.get(
1441
+ user_id=user_id,
1442
+ company_id=company_id,
1443
+ module="UNIQUE_AI", # Optional - filter models by module, only UNIQUE_AI is supported right now
1444
+ )
1445
+ ```
1446
+
1447
+ ### User
1448
+
1449
+ #### `unique_sdk.User.get_users` (Compatible with release >.48)
1450
+
1451
+ Get users in a company. You can filter by email, display name, and use pagination with skip and take parameters.
1452
+
1453
+ ```python
1454
+ users = unique_sdk.User.get_users(
1455
+ user_id=user_id,
1456
+ company_id=company_id,
1457
+ skip=0, # Optional - number of records to skip for pagination
1458
+ take=50, # Optional - number of records to return (max 1000)
1459
+ email="user@example.com", # Optional - filter by email
1460
+ displayName="John", # Optional - filter by display name
1461
+ )
1462
+ ```
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
+
1374
1545
  ### Agentic Table
1375
1546
 
1376
1547
  The Agentic Table (Magic Table) API provides functionality for managing interactive tables with AI-powered cells, activity tracking, and metadata management.
@@ -1915,11 +2086,12 @@ You must provide the following parameters:
1915
2086
  - `mime_type`: The mime type of the ifle to be uploaded.
1916
2087
  - `text`: The text to be sent to the chat for chatting against the file.
1917
2088
 
1918
- 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.
1919
2090
 
1920
2091
  **Optional parameters:**
1921
2092
  - `poll_interval`: The number of seconds to wait between polling attempts (default: `1` second).
1922
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.
1923
2095
 
1924
2096
  Example of chatting against a PDF. (The usage can be extended to any supported file type)
1925
2097
 
@@ -1929,8 +2101,8 @@ latest_message = await unique_sdk.utils.chat_in_space.chat_against_file(
1929
2101
  company_id=company_id,
1930
2102
  assistant_id="assistant_hjcdga64bkcjnhu4",
1931
2103
  path_to_file="/files/hello.pdf",
1932
- displayed_filename="hello.pdf"
1933
- mime_type="application/pdf"
2104
+ displayed_filename="hello.pdf",
2105
+ mime_type="application/pdf",
1934
2106
  text="Give me a bullet point summary of the file.",
1935
2107
  )
1936
2108
  ```
@@ -1976,6 +2148,39 @@ All notable changes to this project will be documented in this file.
1976
2148
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1977
2149
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1978
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
+
2166
+ ## [0.10.42] - 2025-11-14
2167
+ - Add get_users function.
2168
+
2169
+ ## [0.10.41] - 2025-11-13
2170
+ - Add create_message and get_latest_message.
2171
+
2172
+ ## [0.10.40] - 2025-11-10
2173
+ - Don't send description if not defined.
2174
+
2175
+ ## [0.10.39] - 2025-11-07
2176
+ - Add function to get llm models
2177
+
2178
+ ## [0.10.38] - 2025-11-06
2179
+ - Add description property to Reference and Content.
2180
+
2181
+ ## [0.10.37] - 2025-11-04
2182
+ - Introduce local integration tests for Content API Resource
2183
+
1979
2184
  ## [0.10.36] - 2025-11-04
1980
2185
  - Introduce local integration tests for Folder API Resource
1981
2186
 
@@ -24,6 +24,9 @@ The Unique Python SDK provides access to the public API of Unique AI. It also en
24
24
  - [Message Assessment](#message-assessment)
25
25
  - [Folder](#folder)
26
26
  - [Space](#space)
27
+ - [LLM Models](#llm-models)
28
+ - [User](#user)
29
+ - [Group](#group)
27
30
  - [Agentic Table](#agentic-table)
28
31
  6. [UniqueQL](#uniqueql)
29
32
  - [Query Structure](#uniqueql-query-structure)
@@ -242,6 +245,9 @@ unique_sdk.Message.modify(
242
245
  - [Message Assessment](#message-assessment)
243
246
  - [Folder](#folder)
244
247
  - [Space](#space)
248
+ - [LLM Models](#llm-models)
249
+ - [User](#user)
250
+ - [Group](#group)
245
251
  - [Agentic Table](#agentic-table)
246
252
 
247
253
  Most of the API services provide an asynchronous version of the method. The async methods are suffixed with `_async`.
@@ -459,6 +465,7 @@ def upload_file(
459
465
  path_to_file,
460
466
  displayed_filename,
461
467
  mimeType,
468
+ description=None,
462
469
  scope_or_unique_path,
463
470
  ingestion_config=None,
464
471
  metadata=None,
@@ -471,6 +478,7 @@ def upload_file(
471
478
  "key": displayed_filename,
472
479
  "title": displayed_filename,
473
480
  "mimeType": mimeType,
481
+ "description": description,
474
482
  "ingestionConfig": ingestionConfig,
475
483
  "metadata": metadata,
476
484
  },
@@ -497,6 +505,7 @@ def upload_file(
497
505
  "key": displayed_filename,
498
506
  "title": displayed_filename,
499
507
  "mimeType": mimeType,
508
+ "description": description,
500
509
  "byteSize": size,
501
510
  "ingestionConfig": ingestionConfig,
502
511
  "metadata": metadata,
@@ -1341,6 +1350,56 @@ unique_sdk.Folder.delete(
1341
1350
 
1342
1351
  ### Space
1343
1352
 
1353
+ #### `unique_sdk.Space.create_message`
1354
+
1355
+ Send a message in a space. You can optionally provide a chat ID to continue an existing conversation, or omit it to start a new chat.
1356
+
1357
+ ```python
1358
+ message = unique_sdk.Space.create_message(
1359
+ user_id=user_id,
1360
+ company_id=company_id,
1361
+ chatId="chat_dejfhe729br398", # Optional - if not provided, a new chat will be created
1362
+ assistantId="assistant_abc123",
1363
+ text="Hello, how can you help me?",
1364
+ toolChoices=["WebSearch"], # Optional - list of tools to use
1365
+ scopeRules={ # Optional - scope rules for filtering
1366
+ "or": [
1367
+ {
1368
+ "operator": "contains",
1369
+ "path": ["folderIdPath"],
1370
+ "value": "uniquepathid://scope_123"
1371
+ }
1372
+ ]
1373
+ },
1374
+ )
1375
+ ```
1376
+
1377
+ #### `unique_sdk.Space.get_chat_messages` (Compatible with release >.48)
1378
+
1379
+ Get all messages in a space chat. Returns a list of paginated messages in the specified chat.
1380
+
1381
+ ```python
1382
+ messages = unique_sdk.Space.get_chat_messages(
1383
+ user_id=user_id,
1384
+ company_id=company_id,
1385
+ chat_id="chat_dejfhe729br398",
1386
+ skip=0, # Optional (defaults to 0) - number of messages to skip for pagination
1387
+ take=50, # Optional (defaults to 10) - number of messages to return
1388
+ )
1389
+ ```
1390
+
1391
+ #### `unique_sdk.Space.get_latest_message`
1392
+
1393
+ Get the latest message in a space chat.
1394
+
1395
+ ```python
1396
+ message = unique_sdk.Space.get_latest_message(
1397
+ user_id=user_id,
1398
+ company_id=company_id,
1399
+ chat_id="chat_dejfhe729br398",
1400
+ )
1401
+ ```
1402
+
1344
1403
  #### `unique_sdk.Space.delete_chat`
1345
1404
 
1346
1405
  Delete a space chat by id. If the chat does not exist, the function will return an error.
@@ -1353,6 +1412,118 @@ unique_sdk.Space.delete_chat(
1353
1412
  )
1354
1413
  ```
1355
1414
 
1415
+ ### LLM Models
1416
+
1417
+ #### `unique_sdk.LLMModels.get` (Compatible with release >.46)
1418
+
1419
+ Get available LLM models. You can optionally filter by module and skip cache to fetch fresh data.
1420
+
1421
+ ```python
1422
+ models = unique_sdk.LLMModels.get(
1423
+ user_id=user_id,
1424
+ company_id=company_id,
1425
+ module="UNIQUE_AI", # Optional - filter models by module, only UNIQUE_AI is supported right now
1426
+ )
1427
+ ```
1428
+
1429
+ ### User
1430
+
1431
+ #### `unique_sdk.User.get_users` (Compatible with release >.48)
1432
+
1433
+ Get users in a company. You can filter by email, display name, and use pagination with skip and take parameters.
1434
+
1435
+ ```python
1436
+ users = unique_sdk.User.get_users(
1437
+ user_id=user_id,
1438
+ company_id=company_id,
1439
+ skip=0, # Optional - number of records to skip for pagination
1440
+ take=50, # Optional - number of records to return (max 1000)
1441
+ email="user@example.com", # Optional - filter by email
1442
+ displayName="John", # Optional - filter by display name
1443
+ )
1444
+ ```
1445
+
1446
+ ### Group
1447
+
1448
+ #### `unique_sdk.Group.create_group` (Compatible with release >.48)
1449
+
1450
+ Create a new group in a company. You can specify the group name (required), external ID and parent group ID.
1451
+
1452
+ ```python
1453
+ group = unique_sdk.Group.create_group(
1454
+ user_id=user_id,
1455
+ company_id=company_id,
1456
+ name="New Group", # Required - the name of the group
1457
+ externalId="ext_123", # Optional - external ID for the group
1458
+ parentId="group_a9cs7wr2z1bg2sxczvltgjch", # Optional - parent group ID
1459
+ )
1460
+ ```
1461
+
1462
+ #### `unique_sdk.Group.get_groups` (Compatible with release >.48)
1463
+
1464
+ Get groups in a company. You can filter by name and use pagination with skip and take parameters.
1465
+
1466
+ ```python
1467
+ groups = unique_sdk.Group.get_groups(
1468
+ user_id=user_id,
1469
+ company_id=company_id,
1470
+ skip=0, # Optional - number of records to skip for pagination
1471
+ take=50, # Optional - number of records to return (max 1000)
1472
+ name="Admin", # Optional - filter by group name
1473
+ )
1474
+ ```
1475
+
1476
+ #### `unique_sdk.Group.update_group` (Compatible with release >.48)
1477
+
1478
+ Update a group in a company. You can update the group's name.
1479
+
1480
+ ```python
1481
+ updated_group = unique_sdk.Group.update_group(
1482
+ user_id=user_id,
1483
+ company_id=company_id,
1484
+ group_id="group_a9cs7wr2z1bg2sxczvltgjch",
1485
+ name="New Group Name", # Optional - update the group name
1486
+ )
1487
+ ```
1488
+
1489
+ #### `unique_sdk.Group.add_users_to_group` (Compatible with release >.48)
1490
+
1491
+ Add users to a group. Provide an array of user IDs to add as members to the specified group.
1492
+
1493
+ ```python
1494
+ result = unique_sdk.Group.add_users_to_group(
1495
+ user_id=user_id,
1496
+ company_id=company_id,
1497
+ group_id="group_a9cs7wr2z1bg2sxczvltgjch",
1498
+ userIds=["299420877169688584", "325402458132058201", "299426678160031752"], # Required - array of user IDs to add
1499
+ )
1500
+ ```
1501
+
1502
+ #### `unique_sdk.Group.remove_users_from_group` (Compatible with release >.48)
1503
+
1504
+ Remove users from a group. Provide an array of user IDs to remove from the specified group.
1505
+
1506
+ ```python
1507
+ result = unique_sdk.Group.remove_users_from_group(
1508
+ user_id=user_id,
1509
+ company_id=company_id,
1510
+ group_id="group_a9cs7wr2z1bg2sxczvltgjch",
1511
+ userIds=["299426678160031752", "299426678160031752"], # Required - array of user IDs to remove
1512
+ )
1513
+ ```
1514
+
1515
+ #### `unique_sdk.Group.delete_group` (Compatible with release >.48)
1516
+
1517
+ Delete a group in a company by its group ID.
1518
+
1519
+ ```python
1520
+ result = unique_sdk.Group.delete_group(
1521
+ user_id=user_id,
1522
+ company_id=company_id,
1523
+ group_id="group_a9cs7wr2z1bg2sxczvltgjch",
1524
+ )
1525
+ ```
1526
+
1356
1527
  ### Agentic Table
1357
1528
 
1358
1529
  The Agentic Table (Magic Table) API provides functionality for managing interactive tables with AI-powered cells, activity tracking, and metadata management.
@@ -1897,11 +2068,12 @@ You must provide the following parameters:
1897
2068
  - `mime_type`: The mime type of the ifle to be uploaded.
1898
2069
  - `text`: The text to be sent to the chat for chatting against the file.
1899
2070
 
1900
- 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.
2071
+ 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.
1901
2072
 
1902
2073
  **Optional parameters:**
1903
2074
  - `poll_interval`: The number of seconds to wait between polling attempts (default: `1` second).
1904
2075
  - `max_wait`: The maximum number of seconds to wait for the message to complete (default: `60` seconds).
2076
+ - `should_delete_chat`: Setting this flag determines whether the chat should be deleted at the end or not. Default is True.
1905
2077
 
1906
2078
  Example of chatting against a PDF. (The usage can be extended to any supported file type)
1907
2079
 
@@ -1911,8 +2083,8 @@ latest_message = await unique_sdk.utils.chat_in_space.chat_against_file(
1911
2083
  company_id=company_id,
1912
2084
  assistant_id="assistant_hjcdga64bkcjnhu4",
1913
2085
  path_to_file="/files/hello.pdf",
1914
- displayed_filename="hello.pdf"
1915
- mime_type="application/pdf"
2086
+ displayed_filename="hello.pdf",
2087
+ mime_type="application/pdf",
1916
2088
  text="Give me a bullet point summary of the file.",
1917
2089
  )
1918
2090
  ```
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_sdk"
3
- version = "0.10.36"
3
+ version = "0.10.47"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -29,6 +29,7 @@ pytest-cov = "^4.1.0"
29
29
  pytest-asyncio = "^0.24.0"
30
30
  python-dotenv = "^1.1.0"
31
31
  httpx = "^0.28.1"
32
+ ipykernel = "^7.1.0"
32
33
 
33
34
  [tool.poetry.extras]
34
35
  openai = ["openai"]
@@ -83,6 +83,9 @@ from unique_sdk.api_resources._short_term_memory import (
83
83
  from unique_sdk.api_resources._folder import Folder as Folder
84
84
  from unique_sdk.api_resources._embedding import Embeddings as Embeddings
85
85
  from unique_sdk.api_resources._acronyms import Acronyms as Acronyms
86
+ from unique_sdk.api_resources._llm_models import LLMModels as LLMModels
87
+ from unique_sdk.api_resources._user import User as User
88
+ from unique_sdk.api_resources._group import Group as Group
86
89
  from unique_sdk.api_resources._message_assessment import (
87
90
  MessageAssessment as MessageAssessment,
88
91
  )
@@ -20,6 +20,17 @@ from unique_sdk._request_options import RequestOptions
20
20
  class Content(APIResource["Content"]):
21
21
  OBJECT_NAME: ClassVar[Literal["content.search"]] = "content.search"
22
22
 
23
+ id: str
24
+ key: str
25
+ url: Optional[str]
26
+ title: Optional[str]
27
+ updatedAt: str
28
+ chunks: Optional[List["Content.Chunk"]]
29
+ metadata: Optional[Dict[str, Any]]
30
+ writeUrl: Optional[str]
31
+ readUrl: Optional[str]
32
+ expiredAt: Optional[str]
33
+
23
34
  class QueryMode(Enum):
24
35
  Default = "default"
25
36
  Insensitive = "insensitive"
@@ -127,6 +138,7 @@ class Content(APIResource["Content"]):
127
138
  key: str
128
139
  title: Optional[str]
129
140
  mimeType: str
141
+ description: NotRequired[str | None]
130
142
  ownerType: NotRequired[str | None]
131
143
  ownerId: NotRequired[str | None]
132
144
  byteSize: NotRequired[int | None]
@@ -168,6 +180,7 @@ class Content(APIResource["Content"]):
168
180
  title: str | None
169
181
  metadata: Dict[str, Any] | None
170
182
  mimeType: str
183
+ description: str | None
171
184
  byteSize: int
172
185
  ownerId: str
173
186
  createdAt: str
@@ -192,16 +205,6 @@ class Content(APIResource["Content"]):
192
205
  class DeleteResponse(TypedDict):
193
206
  id: str
194
207
 
195
- id: str
196
- key: str
197
- url: Optional[str]
198
- title: Optional[str]
199
- updatedAt: str
200
- chunks: List[Chunk]
201
- metadata: Optional[Dict[str, Any]]
202
- writeUrl: str
203
- readUrl: str
204
-
205
208
  class MagicTableSheetTableColumn(TypedDict):
206
209
  columnId: str
207
210
  columnName: str
@@ -349,6 +352,9 @@ class Content(APIResource["Content"]):
349
352
  """
350
353
  if "input" in params:
351
354
  params["input"]["metadata"] = params["input"].get("metadata") or {}
355
+ if "description" in params["input"] and not params["input"]["description"]:
356
+ params["input"].pop("description")
357
+
352
358
  return cast(
353
359
  "Content",
354
360
  cls._static_request(
@@ -372,6 +378,9 @@ class Content(APIResource["Content"]):
372
378
  """
373
379
  if "input" in params:
374
380
  params["input"]["metadata"] = params["input"].get("metadata") or {}
381
+ if "description" in params["input"] and not params["input"]["description"]:
382
+ params["input"].pop("description")
383
+
375
384
  return cast(
376
385
  "Content",
377
386
  await cls._static_request_async(