unique_sdk 0.10.3__tar.gz → 0.10.5__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 (40) hide show
  1. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/CHANGELOG.md +6 -0
  2. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/PKG-INFO +136 -4
  3. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/README.md +129 -3
  4. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/pyproject.toml +1 -1
  5. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_content.py +41 -5
  6. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_folder.py +56 -2
  7. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_integrated.py +87 -0
  8. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/LICENSE +0 -0
  9. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/__init__.py +0 -0
  10. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_api_requestor.py +0 -0
  11. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_api_resource.py +0 -0
  12. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_api_version.py +0 -0
  13. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_error.py +0 -0
  14. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_http_client.py +0 -0
  15. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_list_object.py +0 -0
  16. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_object_classes.py +0 -0
  17. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_request_options.py +0 -0
  18. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_unique_object.py +0 -0
  19. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_unique_ql.py +0 -0
  20. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_unique_response.py +0 -0
  21. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_util.py +0 -0
  22. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_version.py +0 -0
  23. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/_webhook.py +0 -0
  24. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/__init__.py +0 -0
  25. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_acronyms.py +0 -0
  26. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_chat_completion.py +0 -0
  27. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_embedding.py +0 -0
  28. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_event.py +0 -0
  29. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_mcp.py +0 -0
  30. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_message.py +0 -0
  31. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_message_assessment.py +0 -0
  32. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_search.py +0 -0
  33. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_search_string.py +0 -0
  34. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_short_term_memory.py +0 -0
  35. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/api_resources/_space.py +0 -0
  36. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/utils/chat_history.py +0 -0
  37. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/utils/chat_in_space.py +0 -0
  38. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/utils/file_io.py +0 -0
  39. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/unique_sdk/utils/sources.py +0 -0
  40. {unique_sdk-0.10.3 → unique_sdk-0.10.5}/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.5] - 2025-08-06
9
+ - Get paginated files and folders info.
10
+
11
+ ## [0.10.4] - 2025-08-05
12
+ - Add support for reasoning API with streaming within a chat.
13
+
8
14
  ## [0.10.3] - 2025-08-05
9
15
  - Expose scoreThreshold param for search.
10
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_sdk
3
- Version: 0.10.3
3
+ Version: 0.10.5
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -294,7 +294,7 @@ unique_sdk.Content.search(
294
294
 
295
295
  #### `unique_sdk.Content.get_info`
296
296
 
297
- Allows you to get content info. To filter the results you can define a metadata filter in UniqueQL language. Find out more about it in the UniqueQL section. An example of a metadata filter defined with UniqueQL is the following:
297
+ [Deprecated, use `unique_sdk.Content.get_infos` instead.] Allows you to get content info. To filter the results you can define a metadata filter in UniqueQL language. Find out more about it in the UniqueQL section. An example of a metadata filter defined with UniqueQL is the following:
298
298
 
299
299
  ```python
300
300
  metadataFilter: {
@@ -326,7 +326,7 @@ Pagination is also enabled for this functionality, and the default number of ret
326
326
  - `skip`
327
327
  - `take`
328
328
 
329
- Here is an example of retrieving the first 3 content infos that contain the value `uniquepathid://scope_abcdibgznc4bkdcx120zm5d` in the `folderIdPath` metadata and the value `ai` for the `tile` metadata.
329
+ Here is an example of retrieving the first 3 content infos that contain the value `uniquepathid://scope_abcdibgznc4bkdcx120zm5d` in the `folderIdPath` metadata and the value `ai` for the `title` metadata.
330
330
 
331
331
  ```python
332
332
  content_info_result = unique_sdk.Content.get_info(
@@ -359,6 +359,85 @@ content_info_result = unique_sdk.Content.get_info(
359
359
  )
360
360
  ```
361
361
 
362
+ #### `unique_sdk.Content.get_infos`
363
+
364
+ Allows you to get content infos. To filter the results you can define a either metadata filter in UniqueQL language or specify a parentId. If both are defined, the function will throw an error.
365
+
366
+ I f you want to learn more about UniqueQL, you can find out more about it in the [UniqueQL](#uniqueql) section. An example of a metadata filter defined with UniqueQL is the following:
367
+
368
+ ```python
369
+ metadataFilter: {
370
+ "or": [
371
+ {
372
+ "and": [
373
+ {
374
+ "operator": "contains",
375
+ "path": [
376
+ "folderIdPath"
377
+ ],
378
+ "value": "uniquepathid://test_id"
379
+ },
380
+ {
381
+ "operator": "contains",
382
+ "path": [
383
+ "title"
384
+ ],
385
+ "value": "ai"
386
+ }
387
+ ]
388
+ }
389
+ ]
390
+ },
391
+ ```
392
+
393
+ Pagination is also enabled for this functionality, and the default number of returned results is 50 with no entries skipped. Use the following paramteres to get the desired page:`
394
+
395
+ - `skip`
396
+ - `take`
397
+
398
+ Here is an example of retrieving the first 3 content infos that contain the value `uniquepathid://scope_abcdibgznc4bkdcx120zm5d` in the `folderIdPath` metadata and the value `ai` for the `title` metadata.
399
+
400
+ ```python
401
+ content_info_result = unique_sdk.Content.get_infos(
402
+ user_id=user_id,
403
+ company_id=company_id,
404
+ metadataFilter={
405
+ "or": [
406
+ {
407
+ "and": [
408
+ {
409
+ "operator": "contains",
410
+ "path": [
411
+ "folderIdPath"
412
+ ],
413
+ "value": "uniquepathid://scope_abcdibgznc4bkdcx120zm5d"
414
+ },
415
+ {
416
+ "operator": "contains",
417
+ "path": [
418
+ "title"
419
+ ],
420
+ "value": "ai"
421
+ }
422
+ ]
423
+ }
424
+ ]
425
+ },
426
+ skip=0,
427
+ take=3,
428
+ )
429
+ ```
430
+
431
+ Here is an example of retrieving the contents based on a parentId.
432
+
433
+ ```python
434
+ content_info_result = unique_sdk.Content.get_infos(
435
+ user_id=user_id,
436
+ company_id=company_id,
437
+ parentId="scope_ahefgj389srjbfejkkk98u"
438
+ )
439
+ ```
440
+
362
441
  #### `unique_sdk.Content.upsert`
363
442
 
364
443
  Enables upload of a new Content into the Knowledge base of unique into a specific scope with `scopeId` or a specific `chatId`. One of the two must be set.
@@ -605,6 +684,39 @@ unique_sdk.Integrated.chat_stream_completion(
605
684
 
606
685
  **Warning:** Currently, the deletion of a chat message does not automatically sync with the user UI. Users must refresh the chat page to view the updated state. This issue will be addressed in a future update of our API.
607
686
 
687
+
688
+ #### `unique_sdk.Integrated.responses_stream`
689
+
690
+ Streams the answer to the chat frontend using the Responses API. Given the messages.
691
+
692
+ if the stream creates [source0] it is referenced with the references from the search context.
693
+
694
+ E.g.
695
+
696
+ ```
697
+ Hello this information is from [source1]
698
+ ```
699
+
700
+ adds the reference at index 1 and then changes the text to:
701
+
702
+ ```
703
+ Hello this information is from <sub>0</sub>
704
+ ```
705
+
706
+ ```python
707
+ unique_sdk.Integrated.responses_stream(
708
+ user_id=userId,
709
+ company_id=companyId,
710
+ model="AZURE_o3_2025_0416",
711
+ assistantMessageId=assistantMessageId,
712
+ userMessageId=userMessageId,
713
+ input="Tell me about the curious case of neural text degeneration",
714
+ chatId=chatId,
715
+ )
716
+ ```
717
+
718
+ **Warning:** Currently, the deletion of a chat message does not automatically sync with the user UI. Users must refresh the chat page to view the updated state. This issue will be addressed in a future update of our API.
719
+
608
720
  ### Chat Completion
609
721
 
610
722
  #### `unique_sdk.ChatCompletion.create`
@@ -787,7 +899,7 @@ assessment = unique_sdk.MessageAssessment.modify(
787
899
 
788
900
  ### Folder
789
901
 
790
- #### `unique_sdk.Folder.get`
902
+ #### `unique_sdk.Folder.get_info`
791
903
 
792
904
  Get a folder by scope id or by path.
793
905
 
@@ -811,6 +923,20 @@ unique_sdk.Folder.get_info(
811
923
  )
812
924
  ```
813
925
 
926
+ #### `unique_sdl.Folder.get_infos`
927
+
928
+ Get paginated folders info based on parentId. If the parentId is not defined, the root folders will be returned.
929
+
930
+ ```python
931
+ unique_sdk.Folder.get_infos(
932
+ user_id=user_id,
933
+ company_id=company_id,
934
+ take=10, #optional
935
+ skip=5, #optional
936
+ parentId="scope_s18seqpnltf35niydg77xgyp" #optional
937
+ )
938
+ ```
939
+
814
940
  #### `unique_sdk.Folder.create_paths`
815
941
 
816
942
  Create each folder in the provided list of paths if it does not already exist.
@@ -1338,6 +1464,12 @@ All notable changes to this project will be documented in this file.
1338
1464
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1339
1465
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1340
1466
 
1467
+ ## [0.10.5] - 2025-08-06
1468
+ - Get paginated files and folders info.
1469
+
1470
+ ## [0.10.4] - 2025-08-05
1471
+ - Add support for reasoning API with streaming within a chat.
1472
+
1341
1473
  ## [0.10.3] - 2025-08-05
1342
1474
  - Expose scoreThreshold param for search.
1343
1475
 
@@ -278,7 +278,7 @@ unique_sdk.Content.search(
278
278
 
279
279
  #### `unique_sdk.Content.get_info`
280
280
 
281
- Allows you to get content info. To filter the results you can define a metadata filter in UniqueQL language. Find out more about it in the UniqueQL section. An example of a metadata filter defined with UniqueQL is the following:
281
+ [Deprecated, use `unique_sdk.Content.get_infos` instead.] Allows you to get content info. To filter the results you can define a metadata filter in UniqueQL language. Find out more about it in the UniqueQL section. An example of a metadata filter defined with UniqueQL is the following:
282
282
 
283
283
  ```python
284
284
  metadataFilter: {
@@ -310,7 +310,7 @@ Pagination is also enabled for this functionality, and the default number of ret
310
310
  - `skip`
311
311
  - `take`
312
312
 
313
- Here is an example of retrieving the first 3 content infos that contain the value `uniquepathid://scope_abcdibgznc4bkdcx120zm5d` in the `folderIdPath` metadata and the value `ai` for the `tile` metadata.
313
+ Here is an example of retrieving the first 3 content infos that contain the value `uniquepathid://scope_abcdibgznc4bkdcx120zm5d` in the `folderIdPath` metadata and the value `ai` for the `title` metadata.
314
314
 
315
315
  ```python
316
316
  content_info_result = unique_sdk.Content.get_info(
@@ -343,6 +343,85 @@ content_info_result = unique_sdk.Content.get_info(
343
343
  )
344
344
  ```
345
345
 
346
+ #### `unique_sdk.Content.get_infos`
347
+
348
+ Allows you to get content infos. To filter the results you can define a either metadata filter in UniqueQL language or specify a parentId. If both are defined, the function will throw an error.
349
+
350
+ I f you want to learn more about UniqueQL, you can find out more about it in the [UniqueQL](#uniqueql) section. An example of a metadata filter defined with UniqueQL is the following:
351
+
352
+ ```python
353
+ metadataFilter: {
354
+ "or": [
355
+ {
356
+ "and": [
357
+ {
358
+ "operator": "contains",
359
+ "path": [
360
+ "folderIdPath"
361
+ ],
362
+ "value": "uniquepathid://test_id"
363
+ },
364
+ {
365
+ "operator": "contains",
366
+ "path": [
367
+ "title"
368
+ ],
369
+ "value": "ai"
370
+ }
371
+ ]
372
+ }
373
+ ]
374
+ },
375
+ ```
376
+
377
+ Pagination is also enabled for this functionality, and the default number of returned results is 50 with no entries skipped. Use the following paramteres to get the desired page:`
378
+
379
+ - `skip`
380
+ - `take`
381
+
382
+ Here is an example of retrieving the first 3 content infos that contain the value `uniquepathid://scope_abcdibgznc4bkdcx120zm5d` in the `folderIdPath` metadata and the value `ai` for the `title` metadata.
383
+
384
+ ```python
385
+ content_info_result = unique_sdk.Content.get_infos(
386
+ user_id=user_id,
387
+ company_id=company_id,
388
+ metadataFilter={
389
+ "or": [
390
+ {
391
+ "and": [
392
+ {
393
+ "operator": "contains",
394
+ "path": [
395
+ "folderIdPath"
396
+ ],
397
+ "value": "uniquepathid://scope_abcdibgznc4bkdcx120zm5d"
398
+ },
399
+ {
400
+ "operator": "contains",
401
+ "path": [
402
+ "title"
403
+ ],
404
+ "value": "ai"
405
+ }
406
+ ]
407
+ }
408
+ ]
409
+ },
410
+ skip=0,
411
+ take=3,
412
+ )
413
+ ```
414
+
415
+ Here is an example of retrieving the contents based on a parentId.
416
+
417
+ ```python
418
+ content_info_result = unique_sdk.Content.get_infos(
419
+ user_id=user_id,
420
+ company_id=company_id,
421
+ parentId="scope_ahefgj389srjbfejkkk98u"
422
+ )
423
+ ```
424
+
346
425
  #### `unique_sdk.Content.upsert`
347
426
 
348
427
  Enables upload of a new Content into the Knowledge base of unique into a specific scope with `scopeId` or a specific `chatId`. One of the two must be set.
@@ -589,6 +668,39 @@ unique_sdk.Integrated.chat_stream_completion(
589
668
 
590
669
  **Warning:** Currently, the deletion of a chat message does not automatically sync with the user UI. Users must refresh the chat page to view the updated state. This issue will be addressed in a future update of our API.
591
670
 
671
+
672
+ #### `unique_sdk.Integrated.responses_stream`
673
+
674
+ Streams the answer to the chat frontend using the Responses API. Given the messages.
675
+
676
+ if the stream creates [source0] it is referenced with the references from the search context.
677
+
678
+ E.g.
679
+
680
+ ```
681
+ Hello this information is from [source1]
682
+ ```
683
+
684
+ adds the reference at index 1 and then changes the text to:
685
+
686
+ ```
687
+ Hello this information is from <sub>0</sub>
688
+ ```
689
+
690
+ ```python
691
+ unique_sdk.Integrated.responses_stream(
692
+ user_id=userId,
693
+ company_id=companyId,
694
+ model="AZURE_o3_2025_0416",
695
+ assistantMessageId=assistantMessageId,
696
+ userMessageId=userMessageId,
697
+ input="Tell me about the curious case of neural text degeneration",
698
+ chatId=chatId,
699
+ )
700
+ ```
701
+
702
+ **Warning:** Currently, the deletion of a chat message does not automatically sync with the user UI. Users must refresh the chat page to view the updated state. This issue will be addressed in a future update of our API.
703
+
592
704
  ### Chat Completion
593
705
 
594
706
  #### `unique_sdk.ChatCompletion.create`
@@ -771,7 +883,7 @@ assessment = unique_sdk.MessageAssessment.modify(
771
883
 
772
884
  ### Folder
773
885
 
774
- #### `unique_sdk.Folder.get`
886
+ #### `unique_sdk.Folder.get_info`
775
887
 
776
888
  Get a folder by scope id or by path.
777
889
 
@@ -795,6 +907,20 @@ unique_sdk.Folder.get_info(
795
907
  )
796
908
  ```
797
909
 
910
+ #### `unique_sdl.Folder.get_infos`
911
+
912
+ Get paginated folders info based on parentId. If the parentId is not defined, the root folders will be returned.
913
+
914
+ ```python
915
+ unique_sdk.Folder.get_infos(
916
+ user_id=user_id,
917
+ company_id=company_id,
918
+ take=10, #optional
919
+ skip=5, #optional
920
+ parentId="scope_s18seqpnltf35niydg77xgyp" #optional
921
+ )
922
+ ```
923
+
798
924
  #### `unique_sdk.Folder.create_paths`
799
925
 
800
926
  Create each folder in the provided list of paths if it does not already exist.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_sdk"
3
- version = "0.10.3"
3
+ version = "0.10.5"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -73,8 +73,8 @@ class Content(APIResource["Content"]):
73
73
  """
74
74
 
75
75
  metadataFilter: dict
76
- skip: int | None
77
- take: int | None
76
+ skip: NotRequired[int]
77
+ take: NotRequired[int]
78
78
 
79
79
  class CustomApiOptions(TypedDict):
80
80
  apiIdentifier: str
@@ -145,7 +145,7 @@ class Content(APIResource["Content"]):
145
145
  expiredAt: str | None
146
146
 
147
147
  class PaginatedContentInfo(TypedDict):
148
- contentInfo: List["Content.ContentInfo"]
148
+ contentInfos: List["Content.ContentInfo"]
149
149
  totalCount: int
150
150
 
151
151
  id: str
@@ -230,7 +230,7 @@ class Content(APIResource["Content"]):
230
230
  Content.PaginatedContentInfo,
231
231
  cls._static_request(
232
232
  "post",
233
- "/content/info",
233
+ "/content/infos",
234
234
  user_id,
235
235
  company_id,
236
236
  params=params,
@@ -248,7 +248,43 @@ class Content(APIResource["Content"]):
248
248
  Content.PaginatedContentInfo,
249
249
  await cls._static_request_async(
250
250
  "post",
251
- "/content/info",
251
+ "/content/infos",
252
+ user_id,
253
+ company_id,
254
+ params=params,
255
+ ),
256
+ )
257
+
258
+ @classmethod
259
+ def get_infos(
260
+ cls,
261
+ user_id: str,
262
+ company_id: str,
263
+ **params: Unpack["Content.ContentInfoParams"],
264
+ ) -> "Content.PaginatedContentInfo":
265
+ return cast(
266
+ Content.PaginatedContentInfo,
267
+ cls._static_request(
268
+ "post",
269
+ "/content/infos",
270
+ user_id,
271
+ company_id,
272
+ params=params,
273
+ ),
274
+ )
275
+
276
+ @classmethod
277
+ async def get_infos_async(
278
+ cls,
279
+ user_id: str,
280
+ company_id: str,
281
+ **params: Unpack["Content.ContentInfoParams"],
282
+ ) -> "Content.PaginatedContentInfo":
283
+ return cast(
284
+ Content.PaginatedContentInfo,
285
+ await cls._static_request_async(
286
+ "post",
287
+ "/content/infos",
252
288
  user_id,
253
289
  company_id,
254
290
  params=params,
@@ -1,5 +1,14 @@
1
1
  from enum import Enum
2
- from typing import ClassVar, List, Literal, Optional, TypedDict, Unpack, cast
2
+ from typing import (
3
+ ClassVar,
4
+ List,
5
+ Literal,
6
+ NotRequired,
7
+ Optional,
8
+ TypedDict,
9
+ Unpack,
10
+ cast,
11
+ )
3
12
 
4
13
  from unique_sdk._api_resource import APIResource
5
14
  from unique_sdk._request_options import RequestOptions
@@ -128,12 +137,21 @@ class Folder(APIResource["Folder"]):
128
137
 
129
138
  class GetParams(RequestOptions):
130
139
  """
131
- Parameters for getting a folder by its ID or path.
140
+ Parameters for getting a folder by its Id or path.
132
141
  """
133
142
 
134
143
  scopeId: str | None = None
135
144
  folderPath: str | None = None
136
145
 
146
+ class GetInfosParams(RequestOptions):
147
+ """
148
+ Parameters for getting multiple paginated folders by their parent Id.
149
+ """
150
+
151
+ parentId: NotRequired[str]
152
+ take: NotRequired[int]
153
+ skip: NotRequired[int]
154
+
137
155
  @classmethod
138
156
  def get_info(
139
157
  cls, user_id: str, company_id: str, **params: Unpack["Folder.GetParams"]
@@ -170,6 +188,42 @@ class Folder(APIResource["Folder"]):
170
188
  ),
171
189
  )
172
190
 
191
+ @classmethod
192
+ def get_infos(
193
+ cls, user_id: str, company_id: str, **params: Unpack["Folder.GetInfosParams"]
194
+ ) -> "List[Folder.FolderInfo]":
195
+ """
196
+ Get paginated folders based on parentId. If the parentId is not defined, the root folders will be returned.
197
+ """
198
+ return cast(
199
+ "List[Folder.FolderInfo]",
200
+ cls._static_request(
201
+ "get",
202
+ "/folder/infos",
203
+ user_id,
204
+ company_id,
205
+ params=params,
206
+ ),
207
+ )
208
+
209
+ @classmethod
210
+ async def get_infos_async(
211
+ cls, user_id: str, company_id: str, **params: Unpack["Folder.GetInfosParams"]
212
+ ) -> "List[Folder.FolderInfo]":
213
+ """
214
+ Async get paginated folders based on parentId. If the parentId is not defined, the root folders will be returned.
215
+ """
216
+ return cast(
217
+ "List[Folder.FolderInfo]",
218
+ await cls._static_request_async(
219
+ "get",
220
+ "/folder/infos",
221
+ user_id,
222
+ company_id,
223
+ params=params,
224
+ ),
225
+ )
226
+
173
227
  @classmethod
174
228
  def create_paths(
175
229
  cls, user_id: str, company_id: str, **params: Unpack["Folder.CreateParams"]
@@ -52,6 +52,47 @@ class Integrated(APIResource["Integrated"]):
52
52
  startText: NotRequired["str"]
53
53
  debugInfo: NotRequired[Dict[str, Any]]
54
54
 
55
+ # For further details about the responses parameters, see the OpenAI API documentation.
56
+ class CreateStreamResponseParams(TypedDict):
57
+ debugInfo: Optional[Dict[str, Any]] = None
58
+ input: Any
59
+ model: str
60
+ searchContext: Optional[List["Integrated.SearchResult"]] = None
61
+ chatId: str
62
+ assistantMessageId: str
63
+ userMessageId: str
64
+ startText: str | None = None
65
+ include: Optional[
66
+ list[
67
+ Literal[
68
+ "computer_call_output.output.image_url",
69
+ "file_search_call.results",
70
+ "message.input_image.image_url",
71
+ "reasoning.encrypted_content",
72
+ ]
73
+ ]
74
+ ] = None
75
+ instructions: str | None = None
76
+ max_output_tokens: int | None = None
77
+ metadata: Optional[Dict[str, str]] = None
78
+ parallel_tool_calls: float | None = None
79
+ temperature: float | None = None
80
+ text: Any
81
+ tool_choice: Any
82
+ tools: Any
83
+ top_p: float | None = None
84
+ reasoning: Any
85
+
86
+ class ToolCall(TypedDict):
87
+ id: str
88
+ name: str | None = None
89
+ arguments: str | None = None
90
+
91
+ class ResponsesStreamResult(TypedDict):
92
+ id: str
93
+ message: Message
94
+ toolCalls: List["Integrated.ToolCall"]
95
+
55
96
  @classmethod
56
97
  def chat_stream_completion(
57
98
  cls,
@@ -99,3 +140,49 @@ class Integrated(APIResource["Integrated"]):
99
140
  params,
100
141
  ),
101
142
  )
143
+
144
+ @classmethod
145
+ def responses_stream(
146
+ cls,
147
+ user_id: str,
148
+ company_id: str,
149
+ **params: Unpack["Integrated.CreateStreamResponseParams"],
150
+ ) -> "Integrated.ResponsesStreamResult":
151
+ """
152
+ Executes a call to the language model and streams to the chat in real-time.
153
+ It automatically inserts references that are mentioned by the model.
154
+ In the form of [sourceX]. The reference documents must be given as a list in searchContext.
155
+ """
156
+ return cast(
157
+ "Integrated.Responses",
158
+ cls._static_request(
159
+ "post",
160
+ "/integrated/chat/stream-responses",
161
+ user_id,
162
+ company_id,
163
+ params,
164
+ ),
165
+ )
166
+
167
+ @classmethod
168
+ async def responses_stream_async(
169
+ cls,
170
+ user_id: str,
171
+ company_id: str,
172
+ **params: Unpack["Integrated.CreateStreamResponseParams"],
173
+ ) -> "Integrated.ResponsesStreamResult":
174
+ """
175
+ Executes a call to the language model and streams to the chat in real-time.
176
+ It automatically inserts references that are mentioned by the model.
177
+ In the form of [sourceX]. The reference documents must be given as a list in searchContext.
178
+ """
179
+ return cast(
180
+ "Integrated.Responses",
181
+ cls._static_request(
182
+ "post",
183
+ "/integrated/chat/stream-responses",
184
+ user_id,
185
+ company_id,
186
+ params,
187
+ ),
188
+ )
File without changes