studyfetch-sdk 0.1.0a19__py3-none-any.whl → 0.1.0a21__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.
Files changed (87) hide show
  1. studyfetch_sdk/_models.py +23 -2
  2. studyfetch_sdk/_version.py +1 -1
  3. studyfetch_sdk/resources/v1/__init__.py +6 -104
  4. studyfetch_sdk/resources/v1/chat.py +246 -0
  5. studyfetch_sdk/resources/v1/materials/materials.py +304 -0
  6. studyfetch_sdk/resources/v1/materials/upload.py +30 -14
  7. studyfetch_sdk/resources/v1/v1.py +20 -244
  8. studyfetch_sdk/types/v1/__init__.py +3 -22
  9. studyfetch_sdk/types/v1/chat_stream_params.py +39 -7
  10. studyfetch_sdk/types/v1/component_create_params.py +24 -0
  11. studyfetch_sdk/types/v1/component_generate_embed_params.py +7 -1
  12. studyfetch_sdk/types/v1/generated_material.py +65 -0
  13. studyfetch_sdk/types/v1/material_generate_and_process_params.py +38 -0
  14. studyfetch_sdk/types/v1/material_generate_params.py +32 -0
  15. studyfetch_sdk/types/v1/materials/upload_complete_upload_params.py +2 -5
  16. studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +3 -0
  17. studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +4 -1
  18. studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +3 -0
  19. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/METADATA +1 -1
  20. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/RECORD +22 -83
  21. studyfetch_sdk/resources/v1/audio_recaps/__init__.py +0 -33
  22. studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +0 -328
  23. studyfetch_sdk/resources/v1/audio_recaps/sections.py +0 -250
  24. studyfetch_sdk/resources/v1/chat/__init__.py +0 -47
  25. studyfetch_sdk/resources/v1/chat/chat.py +0 -574
  26. studyfetch_sdk/resources/v1/chat/sessions.py +0 -222
  27. studyfetch_sdk/resources/v1/chat/test.py +0 -190
  28. studyfetch_sdk/resources/v1/data_analyst/__init__.py +0 -47
  29. studyfetch_sdk/resources/v1/data_analyst/data_analyst.py +0 -582
  30. studyfetch_sdk/resources/v1/data_analyst/sessions.py +0 -222
  31. studyfetch_sdk/resources/v1/data_analyst/test.py +0 -190
  32. studyfetch_sdk/resources/v1/explainers.py +0 -441
  33. studyfetch_sdk/resources/v1/flashcards.py +0 -783
  34. studyfetch_sdk/resources/v1/scenarios/__init__.py +0 -61
  35. studyfetch_sdk/resources/v1/scenarios/component.py +0 -426
  36. studyfetch_sdk/resources/v1/scenarios/scenarios.py +0 -936
  37. studyfetch_sdk/resources/v1/scenarios/sessions.py +0 -236
  38. studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +0 -33
  39. studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +0 -102
  40. studyfetch_sdk/resources/v1/scenarios/submissions/user.py +0 -210
  41. studyfetch_sdk/resources/v1/tests/__init__.py +0 -33
  42. studyfetch_sdk/resources/v1/tests/component.py +0 -160
  43. studyfetch_sdk/resources/v1/tests/tests.py +0 -682
  44. studyfetch_sdk/resources/v1/upload/__init__.py +0 -33
  45. studyfetch_sdk/resources/v1/upload/component.py +0 -572
  46. studyfetch_sdk/resources/v1/upload/upload.py +0 -102
  47. studyfetch_sdk/types/v1/audio_recaps/__init__.py +0 -3
  48. studyfetch_sdk/types/v1/chat/__init__.py +0 -5
  49. studyfetch_sdk/types/v1/chat/session_retrieve_params.py +0 -11
  50. studyfetch_sdk/types/v1/chat_get_session_params.py +0 -13
  51. studyfetch_sdk/types/v1/chat_send_message_params.py +0 -54
  52. studyfetch_sdk/types/v1/data_analyst/__init__.py +0 -5
  53. studyfetch_sdk/types/v1/data_analyst/session_retrieve_params.py +0 -11
  54. studyfetch_sdk/types/v1/data_analyst_retrieve_session_params.py +0 -13
  55. studyfetch_sdk/types/v1/data_analyst_send_message_params.py +0 -54
  56. studyfetch_sdk/types/v1/data_analyst_stream_params.py +0 -28
  57. studyfetch_sdk/types/v1/explainer_create_params.py +0 -45
  58. studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +0 -53
  59. studyfetch_sdk/types/v1/flashcard_batch_process_params.py +0 -36
  60. studyfetch_sdk/types/v1/flashcard_batch_process_response.py +0 -39
  61. studyfetch_sdk/types/v1/flashcard_get_algorithm_response.py +0 -37
  62. studyfetch_sdk/types/v1/flashcard_get_all_params.py +0 -23
  63. studyfetch_sdk/types/v1/flashcard_get_due_params.py +0 -19
  64. studyfetch_sdk/types/v1/flashcard_get_stats_params.py +0 -17
  65. studyfetch_sdk/types/v1/flashcard_get_types_response.py +0 -14
  66. studyfetch_sdk/types/v1/flashcard_rate_params.py +0 -23
  67. studyfetch_sdk/types/v1/scenario_create_params.py +0 -48
  68. studyfetch_sdk/types/v1/scenario_submit_answer_params.py +0 -18
  69. studyfetch_sdk/types/v1/scenario_update_params.py +0 -45
  70. studyfetch_sdk/types/v1/scenarios/__init__.py +0 -5
  71. studyfetch_sdk/types/v1/scenarios/component_update_params.py +0 -45
  72. studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +0 -3
  73. studyfetch_sdk/types/v1/test_create_params.py +0 -20
  74. studyfetch_sdk/types/v1/test_retake_params.py +0 -14
  75. studyfetch_sdk/types/v1/test_submit_answer_params.py +0 -20
  76. studyfetch_sdk/types/v1/test_submit_params.py +0 -14
  77. studyfetch_sdk/types/v1/tests/__init__.py +0 -3
  78. studyfetch_sdk/types/v1/upload/__init__.py +0 -11
  79. studyfetch_sdk/types/v1/upload/component_complete_upload_params.py +0 -20
  80. studyfetch_sdk/types/v1/upload/component_complete_upload_response.py +0 -16
  81. studyfetch_sdk/types/v1/upload/component_get_presigned_url_params.py +0 -23
  82. studyfetch_sdk/types/v1/upload/component_get_presigned_url_response.py +0 -15
  83. studyfetch_sdk/types/v1/upload/component_upload_file_params.py +0 -21
  84. studyfetch_sdk/types/v1/upload/component_upload_url_params.py +0 -23
  85. studyfetch_sdk/types/v1/upload/file_upload_response.py +0 -24
  86. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/WHEEL +0 -0
  87. {studyfetch_sdk-0.1.0a19.dist-info → studyfetch_sdk-0.1.0a21.dist-info}/licenses/LICENSE +0 -0
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List, Iterable, Optional
6
+ from typing_extensions import Literal
6
7
 
7
8
  import httpx
8
9
 
@@ -39,9 +40,11 @@ from ....types.v1 import (
39
40
  material_create_params,
40
41
  material_rename_params,
41
42
  material_search_params,
43
+ material_generate_params,
42
44
  material_batch_create_params,
43
45
  material_get_download_url_params,
44
46
  material_create_and_process_params,
47
+ material_generate_and_process_params,
45
48
  )
46
49
  from ...._resource import SyncAPIResource, AsyncAPIResource
47
50
  from ...._response import (
@@ -53,6 +56,7 @@ from ...._response import (
53
56
  from ...._base_client import make_request_options
54
57
  from ....types.v1.material import Material
55
58
  from ....types.v1.content_param import ContentParam
59
+ from ....types.v1.generated_material import GeneratedMaterial
56
60
  from ....types.v1.material_list_response import MaterialListResponse
57
61
  from ....types.v1.material_debug_response import MaterialDebugResponse
58
62
  from ....types.v1.material_search_response import MaterialSearchResponse
@@ -369,6 +373,144 @@ class MaterialsResource(SyncAPIResource):
369
373
  cast_to=MaterialDebugResponse,
370
374
  )
371
375
 
376
+ def generate(
377
+ self,
378
+ *,
379
+ name: str,
380
+ topic: str,
381
+ type: Literal["outline", "overview", "notes", "summary"],
382
+ context: str | NotGiven = NOT_GIVEN,
383
+ folder_id: str | NotGiven = NOT_GIVEN,
384
+ length: Literal["short", "medium", "long"] | NotGiven = NOT_GIVEN,
385
+ level: Literal["high_school", "college", "professional"] | NotGiven = NOT_GIVEN,
386
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
387
+ # The extra values given here take precedence over values defined on the client or passed to this method.
388
+ extra_headers: Headers | None = None,
389
+ extra_query: Query | None = None,
390
+ extra_body: Body | None = None,
391
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
392
+ ) -> GeneratedMaterial:
393
+ """Uses AI to generate study materials like outlines, notes, summaries, etc.
394
+
395
+ from a
396
+ given topic. Returns immediately without waiting for processing.
397
+
398
+ Args:
399
+ name: Name for the generated material
400
+
401
+ topic: Topic or context to generate material from
402
+
403
+ type: Type of material to generate
404
+
405
+ context: Additional context or details about the topic
406
+
407
+ folder_id: Target folder ID
408
+
409
+ length: Length of the generated content
410
+
411
+ level: Target education level
412
+
413
+ extra_headers: Send extra headers
414
+
415
+ extra_query: Add additional query parameters to the request
416
+
417
+ extra_body: Add additional JSON properties to the request
418
+
419
+ timeout: Override the client-level default timeout for this request, in seconds
420
+ """
421
+ return self._post(
422
+ "/api/v1/materials/generate",
423
+ body=maybe_transform(
424
+ {
425
+ "name": name,
426
+ "topic": topic,
427
+ "type": type,
428
+ "context": context,
429
+ "folder_id": folder_id,
430
+ "length": length,
431
+ "level": level,
432
+ },
433
+ material_generate_params.MaterialGenerateParams,
434
+ ),
435
+ options=make_request_options(
436
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
437
+ ),
438
+ cast_to=GeneratedMaterial,
439
+ )
440
+
441
+ def generate_and_process(
442
+ self,
443
+ *,
444
+ name: str,
445
+ topic: str,
446
+ type: Literal["outline", "overview", "notes", "summary"],
447
+ context: str | NotGiven = NOT_GIVEN,
448
+ folder_id: str | NotGiven = NOT_GIVEN,
449
+ length: Literal["short", "medium", "long"] | NotGiven = NOT_GIVEN,
450
+ level: Literal["high_school", "college", "professional"] | NotGiven = NOT_GIVEN,
451
+ poll_interval_ms: float | NotGiven = NOT_GIVEN,
452
+ timeout_ms: float | NotGiven = NOT_GIVEN,
453
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
454
+ # The extra values given here take precedence over values defined on the client or passed to this method.
455
+ extra_headers: Headers | None = None,
456
+ extra_query: Query | None = None,
457
+ extra_body: Body | None = None,
458
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
459
+ ) -> GeneratedMaterial:
460
+ """Uses AI to generate study materials like outlines, notes, summaries, etc.
461
+
462
+ from a
463
+ given topic and waits for processing to complete
464
+
465
+ Args:
466
+ name: Name for the generated material
467
+
468
+ topic: Topic or context to generate material from
469
+
470
+ type: Type of material to generate
471
+
472
+ context: Additional context or details about the topic
473
+
474
+ folder_id: Target folder ID
475
+
476
+ length: Length of the generated content
477
+
478
+ level: Target education level
479
+
480
+ poll_interval_ms: Polling interval in milliseconds (default: 2 seconds)
481
+
482
+ timeout_ms: Maximum time to wait for processing in milliseconds (default: 5 minutes)
483
+
484
+ extra_headers: Send extra headers
485
+
486
+ extra_query: Add additional query parameters to the request
487
+
488
+ extra_body: Add additional JSON properties to the request
489
+
490
+ timeout: Override the client-level default timeout for this request, in seconds
491
+ """
492
+ return self._post(
493
+ "/api/v1/materials/generate-and-process",
494
+ body=maybe_transform(
495
+ {
496
+ "name": name,
497
+ "topic": topic,
498
+ "type": type,
499
+ "context": context,
500
+ "folder_id": folder_id,
501
+ "length": length,
502
+ "level": level,
503
+ "poll_interval_ms": poll_interval_ms,
504
+ "timeout_ms": timeout_ms,
505
+ },
506
+ material_generate_and_process_params.MaterialGenerateAndProcessParams,
507
+ ),
508
+ options=make_request_options(
509
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
510
+ ),
511
+ cast_to=GeneratedMaterial,
512
+ )
513
+
372
514
  def get_download_url(
373
515
  self,
374
516
  id: str,
@@ -879,6 +1021,144 @@ class AsyncMaterialsResource(AsyncAPIResource):
879
1021
  cast_to=MaterialDebugResponse,
880
1022
  )
881
1023
 
1024
+ async def generate(
1025
+ self,
1026
+ *,
1027
+ name: str,
1028
+ topic: str,
1029
+ type: Literal["outline", "overview", "notes", "summary"],
1030
+ context: str | NotGiven = NOT_GIVEN,
1031
+ folder_id: str | NotGiven = NOT_GIVEN,
1032
+ length: Literal["short", "medium", "long"] | NotGiven = NOT_GIVEN,
1033
+ level: Literal["high_school", "college", "professional"] | NotGiven = NOT_GIVEN,
1034
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1035
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1036
+ extra_headers: Headers | None = None,
1037
+ extra_query: Query | None = None,
1038
+ extra_body: Body | None = None,
1039
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1040
+ ) -> GeneratedMaterial:
1041
+ """Uses AI to generate study materials like outlines, notes, summaries, etc.
1042
+
1043
+ from a
1044
+ given topic. Returns immediately without waiting for processing.
1045
+
1046
+ Args:
1047
+ name: Name for the generated material
1048
+
1049
+ topic: Topic or context to generate material from
1050
+
1051
+ type: Type of material to generate
1052
+
1053
+ context: Additional context or details about the topic
1054
+
1055
+ folder_id: Target folder ID
1056
+
1057
+ length: Length of the generated content
1058
+
1059
+ level: Target education level
1060
+
1061
+ extra_headers: Send extra headers
1062
+
1063
+ extra_query: Add additional query parameters to the request
1064
+
1065
+ extra_body: Add additional JSON properties to the request
1066
+
1067
+ timeout: Override the client-level default timeout for this request, in seconds
1068
+ """
1069
+ return await self._post(
1070
+ "/api/v1/materials/generate",
1071
+ body=await async_maybe_transform(
1072
+ {
1073
+ "name": name,
1074
+ "topic": topic,
1075
+ "type": type,
1076
+ "context": context,
1077
+ "folder_id": folder_id,
1078
+ "length": length,
1079
+ "level": level,
1080
+ },
1081
+ material_generate_params.MaterialGenerateParams,
1082
+ ),
1083
+ options=make_request_options(
1084
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1085
+ ),
1086
+ cast_to=GeneratedMaterial,
1087
+ )
1088
+
1089
+ async def generate_and_process(
1090
+ self,
1091
+ *,
1092
+ name: str,
1093
+ topic: str,
1094
+ type: Literal["outline", "overview", "notes", "summary"],
1095
+ context: str | NotGiven = NOT_GIVEN,
1096
+ folder_id: str | NotGiven = NOT_GIVEN,
1097
+ length: Literal["short", "medium", "long"] | NotGiven = NOT_GIVEN,
1098
+ level: Literal["high_school", "college", "professional"] | NotGiven = NOT_GIVEN,
1099
+ poll_interval_ms: float | NotGiven = NOT_GIVEN,
1100
+ timeout_ms: float | NotGiven = NOT_GIVEN,
1101
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1102
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1103
+ extra_headers: Headers | None = None,
1104
+ extra_query: Query | None = None,
1105
+ extra_body: Body | None = None,
1106
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1107
+ ) -> GeneratedMaterial:
1108
+ """Uses AI to generate study materials like outlines, notes, summaries, etc.
1109
+
1110
+ from a
1111
+ given topic and waits for processing to complete
1112
+
1113
+ Args:
1114
+ name: Name for the generated material
1115
+
1116
+ topic: Topic or context to generate material from
1117
+
1118
+ type: Type of material to generate
1119
+
1120
+ context: Additional context or details about the topic
1121
+
1122
+ folder_id: Target folder ID
1123
+
1124
+ length: Length of the generated content
1125
+
1126
+ level: Target education level
1127
+
1128
+ poll_interval_ms: Polling interval in milliseconds (default: 2 seconds)
1129
+
1130
+ timeout_ms: Maximum time to wait for processing in milliseconds (default: 5 minutes)
1131
+
1132
+ extra_headers: Send extra headers
1133
+
1134
+ extra_query: Add additional query parameters to the request
1135
+
1136
+ extra_body: Add additional JSON properties to the request
1137
+
1138
+ timeout: Override the client-level default timeout for this request, in seconds
1139
+ """
1140
+ return await self._post(
1141
+ "/api/v1/materials/generate-and-process",
1142
+ body=await async_maybe_transform(
1143
+ {
1144
+ "name": name,
1145
+ "topic": topic,
1146
+ "type": type,
1147
+ "context": context,
1148
+ "folder_id": folder_id,
1149
+ "length": length,
1150
+ "level": level,
1151
+ "poll_interval_ms": poll_interval_ms,
1152
+ "timeout_ms": timeout_ms,
1153
+ },
1154
+ material_generate_and_process_params.MaterialGenerateAndProcessParams,
1155
+ ),
1156
+ options=make_request_options(
1157
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1158
+ ),
1159
+ cast_to=GeneratedMaterial,
1160
+ )
1161
+
882
1162
  async def get_download_url(
883
1163
  self,
884
1164
  id: str,
@@ -1105,6 +1385,12 @@ class MaterialsResourceWithRawResponse:
1105
1385
  self.debug = to_raw_response_wrapper(
1106
1386
  materials.debug,
1107
1387
  )
1388
+ self.generate = to_raw_response_wrapper(
1389
+ materials.generate,
1390
+ )
1391
+ self.generate_and_process = to_raw_response_wrapper(
1392
+ materials.generate_and_process,
1393
+ )
1108
1394
  self.get_download_url = to_raw_response_wrapper(
1109
1395
  materials.get_download_url,
1110
1396
  )
@@ -1159,6 +1445,12 @@ class AsyncMaterialsResourceWithRawResponse:
1159
1445
  self.debug = async_to_raw_response_wrapper(
1160
1446
  materials.debug,
1161
1447
  )
1448
+ self.generate = async_to_raw_response_wrapper(
1449
+ materials.generate,
1450
+ )
1451
+ self.generate_and_process = async_to_raw_response_wrapper(
1452
+ materials.generate_and_process,
1453
+ )
1162
1454
  self.get_download_url = async_to_raw_response_wrapper(
1163
1455
  materials.get_download_url,
1164
1456
  )
@@ -1213,6 +1505,12 @@ class MaterialsResourceWithStreamingResponse:
1213
1505
  self.debug = to_streamed_response_wrapper(
1214
1506
  materials.debug,
1215
1507
  )
1508
+ self.generate = to_streamed_response_wrapper(
1509
+ materials.generate,
1510
+ )
1511
+ self.generate_and_process = to_streamed_response_wrapper(
1512
+ materials.generate_and_process,
1513
+ )
1216
1514
  self.get_download_url = to_streamed_response_wrapper(
1217
1515
  materials.get_download_url,
1218
1516
  )
@@ -1267,6 +1565,12 @@ class AsyncMaterialsResourceWithStreamingResponse:
1267
1565
  self.debug = async_to_streamed_response_wrapper(
1268
1566
  materials.debug,
1269
1567
  )
1568
+ self.generate = async_to_streamed_response_wrapper(
1569
+ materials.generate,
1570
+ )
1571
+ self.generate_and_process = async_to_streamed_response_wrapper(
1572
+ materials.generate_and_process,
1573
+ )
1270
1574
  self.get_download_url = async_to_streamed_response_wrapper(
1271
1575
  materials.get_download_url,
1272
1576
  )
@@ -55,7 +55,6 @@ class UploadResource(SyncAPIResource):
55
55
  self,
56
56
  *,
57
57
  material_id: str,
58
- organization_id: str,
59
58
  s3_key: str,
60
59
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
61
60
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -68,11 +67,9 @@ class UploadResource(SyncAPIResource):
68
67
  Complete upload after using presigned URL
69
68
 
70
69
  Args:
71
- material_id: The ID of the material that was uploaded
70
+ material_id: Material ID from presigned URL response
72
71
 
73
- organization_id: The ID of the organization
74
-
75
- s3_key: The S3 key of the uploaded file
72
+ s3_key: S3 key from presigned URL response
76
73
 
77
74
  extra_headers: Send extra headers
78
75
 
@@ -87,7 +84,6 @@ class UploadResource(SyncAPIResource):
87
84
  body=maybe_transform(
88
85
  {
89
86
  "material_id": material_id,
90
- "organization_id": organization_id,
91
87
  "s3_key": s3_key,
92
88
  },
93
89
  upload_complete_upload_params.UploadCompleteUploadParams,
@@ -104,6 +100,7 @@ class UploadResource(SyncAPIResource):
104
100
  content_type: str,
105
101
  filename: str,
106
102
  name: str,
103
+ extract_images: bool | NotGiven = NOT_GIVEN,
107
104
  folder_id: str | NotGiven = NOT_GIVEN,
108
105
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
109
106
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -122,6 +119,8 @@ class UploadResource(SyncAPIResource):
122
119
 
123
120
  name: Display name for the material
124
121
 
122
+ extract_images: Whether to extract images from files
123
+
125
124
  folder_id: Folder ID to place the material in
126
125
 
127
126
  extra_headers: Send extra headers
@@ -139,6 +138,7 @@ class UploadResource(SyncAPIResource):
139
138
  "content_type": content_type,
140
139
  "filename": filename,
141
140
  "name": name,
141
+ "extract_images": extract_images,
142
142
  "folder_id": folder_id,
143
143
  },
144
144
  upload_create_presigned_url_params.UploadCreatePresignedURLParams,
@@ -154,6 +154,7 @@ class UploadResource(SyncAPIResource):
154
154
  *,
155
155
  file: FileTypes,
156
156
  name: str,
157
+ extract_images: str | NotGiven = NOT_GIVEN,
157
158
  folder_id: str | NotGiven = NOT_GIVEN,
158
159
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
159
160
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -168,6 +169,8 @@ class UploadResource(SyncAPIResource):
168
169
  Args:
169
170
  name: Material name
170
171
 
172
+ extract_images: Whether to extract images from files (true/false, default: true)
173
+
171
174
  folder_id: Folder ID (optional)
172
175
 
173
176
  extra_headers: Send extra headers
@@ -182,6 +185,7 @@ class UploadResource(SyncAPIResource):
182
185
  {
183
186
  "file": file,
184
187
  "name": name,
188
+ "extract_images": extract_images,
185
189
  "folder_id": folder_id,
186
190
  }
187
191
  )
@@ -205,6 +209,7 @@ class UploadResource(SyncAPIResource):
205
209
  *,
206
210
  file: FileTypes,
207
211
  name: str,
212
+ extract_images: str | NotGiven = NOT_GIVEN,
208
213
  folder_id: str | NotGiven = NOT_GIVEN,
209
214
  poll_interval_ms: float | NotGiven = NOT_GIVEN,
210
215
  timeout_ms: float | NotGiven = NOT_GIVEN,
@@ -223,11 +228,13 @@ class UploadResource(SyncAPIResource):
223
228
  Args:
224
229
  name: Material name
225
230
 
231
+ extract_images: Whether to extract images from files (true/false, default: true)
232
+
226
233
  folder_id: Folder ID (optional)
227
234
 
228
235
  poll_interval_ms: Polling interval in milliseconds (default: 2000)
229
236
 
230
- timeout_ms: Processing timeout in milliseconds (default: 300000)
237
+ timeout_ms: Processing timeout in milliseconds (default: 300000 - 5 minutes)
231
238
 
232
239
  extra_headers: Send extra headers
233
240
 
@@ -241,6 +248,7 @@ class UploadResource(SyncAPIResource):
241
248
  {
242
249
  "file": file,
243
250
  "name": name,
251
+ "extract_images": extract_images,
244
252
  "folder_id": folder_id,
245
253
  "poll_interval_ms": poll_interval_ms,
246
254
  "timeout_ms": timeout_ms,
@@ -389,7 +397,6 @@ class AsyncUploadResource(AsyncAPIResource):
389
397
  self,
390
398
  *,
391
399
  material_id: str,
392
- organization_id: str,
393
400
  s3_key: str,
394
401
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
395
402
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -402,11 +409,9 @@ class AsyncUploadResource(AsyncAPIResource):
402
409
  Complete upload after using presigned URL
403
410
 
404
411
  Args:
405
- material_id: The ID of the material that was uploaded
412
+ material_id: Material ID from presigned URL response
406
413
 
407
- organization_id: The ID of the organization
408
-
409
- s3_key: The S3 key of the uploaded file
414
+ s3_key: S3 key from presigned URL response
410
415
 
411
416
  extra_headers: Send extra headers
412
417
 
@@ -421,7 +426,6 @@ class AsyncUploadResource(AsyncAPIResource):
421
426
  body=await async_maybe_transform(
422
427
  {
423
428
  "material_id": material_id,
424
- "organization_id": organization_id,
425
429
  "s3_key": s3_key,
426
430
  },
427
431
  upload_complete_upload_params.UploadCompleteUploadParams,
@@ -438,6 +442,7 @@ class AsyncUploadResource(AsyncAPIResource):
438
442
  content_type: str,
439
443
  filename: str,
440
444
  name: str,
445
+ extract_images: bool | NotGiven = NOT_GIVEN,
441
446
  folder_id: str | NotGiven = NOT_GIVEN,
442
447
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
443
448
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -456,6 +461,8 @@ class AsyncUploadResource(AsyncAPIResource):
456
461
 
457
462
  name: Display name for the material
458
463
 
464
+ extract_images: Whether to extract images from files
465
+
459
466
  folder_id: Folder ID to place the material in
460
467
 
461
468
  extra_headers: Send extra headers
@@ -473,6 +480,7 @@ class AsyncUploadResource(AsyncAPIResource):
473
480
  "content_type": content_type,
474
481
  "filename": filename,
475
482
  "name": name,
483
+ "extract_images": extract_images,
476
484
  "folder_id": folder_id,
477
485
  },
478
486
  upload_create_presigned_url_params.UploadCreatePresignedURLParams,
@@ -488,6 +496,7 @@ class AsyncUploadResource(AsyncAPIResource):
488
496
  *,
489
497
  file: FileTypes,
490
498
  name: str,
499
+ extract_images: str | NotGiven = NOT_GIVEN,
491
500
  folder_id: str | NotGiven = NOT_GIVEN,
492
501
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
493
502
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -502,6 +511,8 @@ class AsyncUploadResource(AsyncAPIResource):
502
511
  Args:
503
512
  name: Material name
504
513
 
514
+ extract_images: Whether to extract images from files (true/false, default: true)
515
+
505
516
  folder_id: Folder ID (optional)
506
517
 
507
518
  extra_headers: Send extra headers
@@ -516,6 +527,7 @@ class AsyncUploadResource(AsyncAPIResource):
516
527
  {
517
528
  "file": file,
518
529
  "name": name,
530
+ "extract_images": extract_images,
519
531
  "folder_id": folder_id,
520
532
  }
521
533
  )
@@ -539,6 +551,7 @@ class AsyncUploadResource(AsyncAPIResource):
539
551
  *,
540
552
  file: FileTypes,
541
553
  name: str,
554
+ extract_images: str | NotGiven = NOT_GIVEN,
542
555
  folder_id: str | NotGiven = NOT_GIVEN,
543
556
  poll_interval_ms: float | NotGiven = NOT_GIVEN,
544
557
  timeout_ms: float | NotGiven = NOT_GIVEN,
@@ -557,11 +570,13 @@ class AsyncUploadResource(AsyncAPIResource):
557
570
  Args:
558
571
  name: Material name
559
572
 
573
+ extract_images: Whether to extract images from files (true/false, default: true)
574
+
560
575
  folder_id: Folder ID (optional)
561
576
 
562
577
  poll_interval_ms: Polling interval in milliseconds (default: 2000)
563
578
 
564
- timeout_ms: Processing timeout in milliseconds (default: 300000)
579
+ timeout_ms: Processing timeout in milliseconds (default: 300000 - 5 minutes)
565
580
 
566
581
  extra_headers: Send extra headers
567
582
 
@@ -575,6 +590,7 @@ class AsyncUploadResource(AsyncAPIResource):
575
590
  {
576
591
  "file": file,
577
592
  "name": name,
593
+ "extract_images": extract_images,
578
594
  "folder_id": folder_id,
579
595
  "poll_interval_ms": poll_interval_ms,
580
596
  "timeout_ms": timeout_ms,