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
@@ -4,6 +4,14 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
6
 
7
+ from .chat import (
8
+ ChatResource,
9
+ AsyncChatResource,
10
+ ChatResourceWithRawResponse,
11
+ AsyncChatResourceWithRawResponse,
12
+ ChatResourceWithStreamingResponse,
13
+ AsyncChatResourceWithStreamingResponse,
14
+ )
7
15
  from .folders import (
8
16
  FoldersResource,
9
17
  AsyncFoldersResource,
@@ -14,14 +22,6 @@ from .folders import (
14
22
  )
15
23
  from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
16
24
  from ..._compat import cached_property
17
- from .chat.chat import (
18
- ChatResource,
19
- AsyncChatResource,
20
- ChatResourceWithRawResponse,
21
- AsyncChatResourceWithRawResponse,
22
- ChatResourceWithStreamingResponse,
23
- AsyncChatResourceWithStreamingResponse,
24
- )
25
25
  from .components import (
26
26
  ComponentsResource,
27
27
  AsyncComponentsResource,
@@ -30,22 +30,6 @@ from .components import (
30
30
  ComponentsResourceWithStreamingResponse,
31
31
  AsyncComponentsResourceWithStreamingResponse,
32
32
  )
33
- from .explainers import (
34
- ExplainersResource,
35
- AsyncExplainersResource,
36
- ExplainersResourceWithRawResponse,
37
- AsyncExplainersResourceWithRawResponse,
38
- ExplainersResourceWithStreamingResponse,
39
- AsyncExplainersResourceWithStreamingResponse,
40
- )
41
- from .flashcards import (
42
- FlashcardsResource,
43
- AsyncFlashcardsResource,
44
- FlashcardsResourceWithRawResponse,
45
- AsyncFlashcardsResourceWithRawResponse,
46
- FlashcardsResourceWithStreamingResponse,
47
- AsyncFlashcardsResourceWithStreamingResponse,
48
- )
49
33
  from ..._resource import SyncAPIResource, AsyncAPIResource
50
34
  from ..._response import (
51
35
  to_raw_response_wrapper,
@@ -61,14 +45,6 @@ from .embed.embed import (
61
45
  EmbedResourceWithStreamingResponse,
62
46
  AsyncEmbedResourceWithStreamingResponse,
63
47
  )
64
- from .tests.tests import (
65
- TestsResource,
66
- AsyncTestsResource,
67
- TestsResourceWithRawResponse,
68
- AsyncTestsResourceWithRawResponse,
69
- TestsResourceWithStreamingResponse,
70
- AsyncTestsResourceWithStreamingResponse,
71
- )
72
48
  from .usage.usage import (
73
49
  UsageResource,
74
50
  AsyncUsageResource,
@@ -77,14 +53,6 @@ from .usage.usage import (
77
53
  UsageResourceWithStreamingResponse,
78
54
  AsyncUsageResourceWithStreamingResponse,
79
55
  )
80
- from .upload.upload import (
81
- UploadResource,
82
- AsyncUploadResource,
83
- UploadResourceWithRawResponse,
84
- AsyncUploadResourceWithRawResponse,
85
- UploadResourceWithStreamingResponse,
86
- AsyncUploadResourceWithStreamingResponse,
87
- )
88
56
  from ..._base_client import make_request_options
89
57
  from .assignment_grader import (
90
58
  AssignmentGraderResource,
@@ -102,30 +70,6 @@ from .materials.materials import (
102
70
  MaterialsResourceWithStreamingResponse,
103
71
  AsyncMaterialsResourceWithStreamingResponse,
104
72
  )
105
- from .scenarios.scenarios import (
106
- ScenariosResource,
107
- AsyncScenariosResource,
108
- ScenariosResourceWithRawResponse,
109
- AsyncScenariosResourceWithRawResponse,
110
- ScenariosResourceWithStreamingResponse,
111
- AsyncScenariosResourceWithStreamingResponse,
112
- )
113
- from .audio_recaps.audio_recaps import (
114
- AudioRecapsResource,
115
- AsyncAudioRecapsResource,
116
- AudioRecapsResourceWithRawResponse,
117
- AsyncAudioRecapsResourceWithRawResponse,
118
- AudioRecapsResourceWithStreamingResponse,
119
- AsyncAudioRecapsResourceWithStreamingResponse,
120
- )
121
- from .data_analyst.data_analyst import (
122
- DataAnalystResource,
123
- AsyncDataAnalystResource,
124
- DataAnalystResourceWithRawResponse,
125
- AsyncDataAnalystResourceWithRawResponse,
126
- DataAnalystResourceWithStreamingResponse,
127
- AsyncDataAnalystResourceWithStreamingResponse,
128
- )
129
73
 
130
74
  __all__ = ["V1Resource", "AsyncV1Resource"]
131
75
 
@@ -151,41 +95,13 @@ class V1Resource(SyncAPIResource):
151
95
  def embed(self) -> EmbedResource:
152
96
  return EmbedResource(self._client)
153
97
 
154
- @cached_property
155
- def chat(self) -> ChatResource:
156
- return ChatResource(self._client)
157
-
158
- @cached_property
159
- def tests(self) -> TestsResource:
160
- return TestsResource(self._client)
161
-
162
- @cached_property
163
- def audio_recaps(self) -> AudioRecapsResource:
164
- return AudioRecapsResource(self._client)
165
-
166
- @cached_property
167
- def flashcards(self) -> FlashcardsResource:
168
- return FlashcardsResource(self._client)
169
-
170
- @cached_property
171
- def scenarios(self) -> ScenariosResource:
172
- return ScenariosResource(self._client)
173
-
174
- @cached_property
175
- def explainers(self) -> ExplainersResource:
176
- return ExplainersResource(self._client)
177
-
178
- @cached_property
179
- def upload(self) -> UploadResource:
180
- return UploadResource(self._client)
181
-
182
98
  @cached_property
183
99
  def assignment_grader(self) -> AssignmentGraderResource:
184
100
  return AssignmentGraderResource(self._client)
185
101
 
186
102
  @cached_property
187
- def data_analyst(self) -> DataAnalystResource:
188
- return DataAnalystResource(self._client)
103
+ def chat(self) -> ChatResource:
104
+ return ChatResource(self._client)
189
105
 
190
106
  @cached_property
191
107
  def with_raw_response(self) -> V1ResourceWithRawResponse:
@@ -248,41 +164,13 @@ class AsyncV1Resource(AsyncAPIResource):
248
164
  def embed(self) -> AsyncEmbedResource:
249
165
  return AsyncEmbedResource(self._client)
250
166
 
251
- @cached_property
252
- def chat(self) -> AsyncChatResource:
253
- return AsyncChatResource(self._client)
254
-
255
- @cached_property
256
- def tests(self) -> AsyncTestsResource:
257
- return AsyncTestsResource(self._client)
258
-
259
- @cached_property
260
- def audio_recaps(self) -> AsyncAudioRecapsResource:
261
- return AsyncAudioRecapsResource(self._client)
262
-
263
- @cached_property
264
- def flashcards(self) -> AsyncFlashcardsResource:
265
- return AsyncFlashcardsResource(self._client)
266
-
267
- @cached_property
268
- def scenarios(self) -> AsyncScenariosResource:
269
- return AsyncScenariosResource(self._client)
270
-
271
- @cached_property
272
- def explainers(self) -> AsyncExplainersResource:
273
- return AsyncExplainersResource(self._client)
274
-
275
- @cached_property
276
- def upload(self) -> AsyncUploadResource:
277
- return AsyncUploadResource(self._client)
278
-
279
167
  @cached_property
280
168
  def assignment_grader(self) -> AsyncAssignmentGraderResource:
281
169
  return AsyncAssignmentGraderResource(self._client)
282
170
 
283
171
  @cached_property
284
- def data_analyst(self) -> AsyncDataAnalystResource:
285
- return AsyncDataAnalystResource(self._client)
172
+ def chat(self) -> AsyncChatResource:
173
+ return AsyncChatResource(self._client)
286
174
 
287
175
  @cached_property
288
176
  def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
@@ -352,41 +240,13 @@ class V1ResourceWithRawResponse:
352
240
  def embed(self) -> EmbedResourceWithRawResponse:
353
241
  return EmbedResourceWithRawResponse(self._v1.embed)
354
242
 
355
- @cached_property
356
- def chat(self) -> ChatResourceWithRawResponse:
357
- return ChatResourceWithRawResponse(self._v1.chat)
358
-
359
- @cached_property
360
- def tests(self) -> TestsResourceWithRawResponse:
361
- return TestsResourceWithRawResponse(self._v1.tests)
362
-
363
- @cached_property
364
- def audio_recaps(self) -> AudioRecapsResourceWithRawResponse:
365
- return AudioRecapsResourceWithRawResponse(self._v1.audio_recaps)
366
-
367
- @cached_property
368
- def flashcards(self) -> FlashcardsResourceWithRawResponse:
369
- return FlashcardsResourceWithRawResponse(self._v1.flashcards)
370
-
371
- @cached_property
372
- def scenarios(self) -> ScenariosResourceWithRawResponse:
373
- return ScenariosResourceWithRawResponse(self._v1.scenarios)
374
-
375
- @cached_property
376
- def explainers(self) -> ExplainersResourceWithRawResponse:
377
- return ExplainersResourceWithRawResponse(self._v1.explainers)
378
-
379
- @cached_property
380
- def upload(self) -> UploadResourceWithRawResponse:
381
- return UploadResourceWithRawResponse(self._v1.upload)
382
-
383
243
  @cached_property
384
244
  def assignment_grader(self) -> AssignmentGraderResourceWithRawResponse:
385
245
  return AssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
386
246
 
387
247
  @cached_property
388
- def data_analyst(self) -> DataAnalystResourceWithRawResponse:
389
- return DataAnalystResourceWithRawResponse(self._v1.data_analyst)
248
+ def chat(self) -> ChatResourceWithRawResponse:
249
+ return ChatResourceWithRawResponse(self._v1.chat)
390
250
 
391
251
 
392
252
  class AsyncV1ResourceWithRawResponse:
@@ -417,41 +277,13 @@ class AsyncV1ResourceWithRawResponse:
417
277
  def embed(self) -> AsyncEmbedResourceWithRawResponse:
418
278
  return AsyncEmbedResourceWithRawResponse(self._v1.embed)
419
279
 
420
- @cached_property
421
- def chat(self) -> AsyncChatResourceWithRawResponse:
422
- return AsyncChatResourceWithRawResponse(self._v1.chat)
423
-
424
- @cached_property
425
- def tests(self) -> AsyncTestsResourceWithRawResponse:
426
- return AsyncTestsResourceWithRawResponse(self._v1.tests)
427
-
428
- @cached_property
429
- def audio_recaps(self) -> AsyncAudioRecapsResourceWithRawResponse:
430
- return AsyncAudioRecapsResourceWithRawResponse(self._v1.audio_recaps)
431
-
432
- @cached_property
433
- def flashcards(self) -> AsyncFlashcardsResourceWithRawResponse:
434
- return AsyncFlashcardsResourceWithRawResponse(self._v1.flashcards)
435
-
436
- @cached_property
437
- def scenarios(self) -> AsyncScenariosResourceWithRawResponse:
438
- return AsyncScenariosResourceWithRawResponse(self._v1.scenarios)
439
-
440
- @cached_property
441
- def explainers(self) -> AsyncExplainersResourceWithRawResponse:
442
- return AsyncExplainersResourceWithRawResponse(self._v1.explainers)
443
-
444
- @cached_property
445
- def upload(self) -> AsyncUploadResourceWithRawResponse:
446
- return AsyncUploadResourceWithRawResponse(self._v1.upload)
447
-
448
280
  @cached_property
449
281
  def assignment_grader(self) -> AsyncAssignmentGraderResourceWithRawResponse:
450
282
  return AsyncAssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
451
283
 
452
284
  @cached_property
453
- def data_analyst(self) -> AsyncDataAnalystResourceWithRawResponse:
454
- return AsyncDataAnalystResourceWithRawResponse(self._v1.data_analyst)
285
+ def chat(self) -> AsyncChatResourceWithRawResponse:
286
+ return AsyncChatResourceWithRawResponse(self._v1.chat)
455
287
 
456
288
 
457
289
  class V1ResourceWithStreamingResponse:
@@ -482,41 +314,13 @@ class V1ResourceWithStreamingResponse:
482
314
  def embed(self) -> EmbedResourceWithStreamingResponse:
483
315
  return EmbedResourceWithStreamingResponse(self._v1.embed)
484
316
 
485
- @cached_property
486
- def chat(self) -> ChatResourceWithStreamingResponse:
487
- return ChatResourceWithStreamingResponse(self._v1.chat)
488
-
489
- @cached_property
490
- def tests(self) -> TestsResourceWithStreamingResponse:
491
- return TestsResourceWithStreamingResponse(self._v1.tests)
492
-
493
- @cached_property
494
- def audio_recaps(self) -> AudioRecapsResourceWithStreamingResponse:
495
- return AudioRecapsResourceWithStreamingResponse(self._v1.audio_recaps)
496
-
497
- @cached_property
498
- def flashcards(self) -> FlashcardsResourceWithStreamingResponse:
499
- return FlashcardsResourceWithStreamingResponse(self._v1.flashcards)
500
-
501
- @cached_property
502
- def scenarios(self) -> ScenariosResourceWithStreamingResponse:
503
- return ScenariosResourceWithStreamingResponse(self._v1.scenarios)
504
-
505
- @cached_property
506
- def explainers(self) -> ExplainersResourceWithStreamingResponse:
507
- return ExplainersResourceWithStreamingResponse(self._v1.explainers)
508
-
509
- @cached_property
510
- def upload(self) -> UploadResourceWithStreamingResponse:
511
- return UploadResourceWithStreamingResponse(self._v1.upload)
512
-
513
317
  @cached_property
514
318
  def assignment_grader(self) -> AssignmentGraderResourceWithStreamingResponse:
515
319
  return AssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
516
320
 
517
321
  @cached_property
518
- def data_analyst(self) -> DataAnalystResourceWithStreamingResponse:
519
- return DataAnalystResourceWithStreamingResponse(self._v1.data_analyst)
322
+ def chat(self) -> ChatResourceWithStreamingResponse:
323
+ return ChatResourceWithStreamingResponse(self._v1.chat)
520
324
 
521
325
 
522
326
  class AsyncV1ResourceWithStreamingResponse:
@@ -547,38 +351,10 @@ class AsyncV1ResourceWithStreamingResponse:
547
351
  def embed(self) -> AsyncEmbedResourceWithStreamingResponse:
548
352
  return AsyncEmbedResourceWithStreamingResponse(self._v1.embed)
549
353
 
550
- @cached_property
551
- def chat(self) -> AsyncChatResourceWithStreamingResponse:
552
- return AsyncChatResourceWithStreamingResponse(self._v1.chat)
553
-
554
- @cached_property
555
- def tests(self) -> AsyncTestsResourceWithStreamingResponse:
556
- return AsyncTestsResourceWithStreamingResponse(self._v1.tests)
557
-
558
- @cached_property
559
- def audio_recaps(self) -> AsyncAudioRecapsResourceWithStreamingResponse:
560
- return AsyncAudioRecapsResourceWithStreamingResponse(self._v1.audio_recaps)
561
-
562
- @cached_property
563
- def flashcards(self) -> AsyncFlashcardsResourceWithStreamingResponse:
564
- return AsyncFlashcardsResourceWithStreamingResponse(self._v1.flashcards)
565
-
566
- @cached_property
567
- def scenarios(self) -> AsyncScenariosResourceWithStreamingResponse:
568
- return AsyncScenariosResourceWithStreamingResponse(self._v1.scenarios)
569
-
570
- @cached_property
571
- def explainers(self) -> AsyncExplainersResourceWithStreamingResponse:
572
- return AsyncExplainersResourceWithStreamingResponse(self._v1.explainers)
573
-
574
- @cached_property
575
- def upload(self) -> AsyncUploadResourceWithStreamingResponse:
576
- return AsyncUploadResourceWithStreamingResponse(self._v1.upload)
577
-
578
354
  @cached_property
579
355
  def assignment_grader(self) -> AsyncAssignmentGraderResourceWithStreamingResponse:
580
356
  return AsyncAssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
581
357
 
582
358
  @cached_property
583
- def data_analyst(self) -> AsyncDataAnalystResourceWithStreamingResponse:
584
- return AsyncDataAnalystResourceWithStreamingResponse(self._v1.data_analyst)
359
+ def chat(self) -> AsyncChatResourceWithStreamingResponse:
360
+ return AsyncChatResourceWithStreamingResponse(self._v1.chat)
@@ -7,54 +7,35 @@ from .component import Component as Component
7
7
  from .content_param import ContentParam as ContentParam
8
8
  from .chat_stream_params import ChatStreamParams as ChatStreamParams
9
9
  from .folder_list_params import FolderListParams as FolderListParams
10
- from .test_create_params import TestCreateParams as TestCreateParams
11
- from .test_retake_params import TestRetakeParams as TestRetakeParams
12
- from .test_submit_params import TestSubmitParams as TestSubmitParams
10
+ from .generated_material import GeneratedMaterial as GeneratedMaterial
13
11
  from .embed_verify_params import EmbedVerifyParams as EmbedVerifyParams
14
12
  from .folder_create_params import FolderCreateParams as FolderCreateParams
15
13
  from .folder_update_params import FolderUpdateParams as FolderUpdateParams
16
14
  from .material_list_params import MaterialListParams as MaterialListParams
17
15
  from .material_move_params import MaterialMoveParams as MaterialMoveParams
18
16
  from .component_list_params import ComponentListParams as ComponentListParams
19
- from .flashcard_rate_params import FlashcardRateParams as FlashcardRateParams
20
17
  from .embed_get_theme_params import EmbedGetThemeParams as EmbedGetThemeParams
21
18
  from .material_create_params import MaterialCreateParams as MaterialCreateParams
22
19
  from .material_list_response import MaterialListResponse as MaterialListResponse
23
20
  from .material_rename_params import MaterialRenameParams as MaterialRenameParams
24
21
  from .material_search_params import MaterialSearchParams as MaterialSearchParams
25
- from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
26
- from .scenario_update_params import ScenarioUpdateParams as ScenarioUpdateParams
27
22
  from .usage_get_stats_params import UsageGetStatsParams as UsageGetStatsParams
28
- from .chat_get_session_params import ChatGetSessionParams as ChatGetSessionParams
29
23
  from .component_create_params import ComponentCreateParams as ComponentCreateParams
30
24
  from .component_list_response import ComponentListResponse as ComponentListResponse
31
25
  from .component_update_params import ComponentUpdateParams as ComponentUpdateParams
32
- from .explainer_create_params import ExplainerCreateParams as ExplainerCreateParams
33
26
  from .material_debug_response import MaterialDebugResponse as MaterialDebugResponse
34
- from .chat_send_message_params import ChatSendMessageParams as ChatSendMessageParams
35
- from .flashcard_get_all_params import FlashcardGetAllParams as FlashcardGetAllParams
36
- from .flashcard_get_due_params import FlashcardGetDueParams as FlashcardGetDueParams
27
+ from .material_generate_params import MaterialGenerateParams as MaterialGenerateParams
37
28
  from .material_search_response import MaterialSearchResponse as MaterialSearchResponse
38
29
  from .usage_get_summary_params import UsageGetSummaryParams as UsageGetSummaryParams
39
30
  from .usage_list_events_params import UsageListEventsParams as UsageListEventsParams
40
- from .test_submit_answer_params import TestSubmitAnswerParams as TestSubmitAnswerParams
41
31
  from .assignment_grader_response import AssignmentGraderResponse as AssignmentGraderResponse
42
- from .data_analyst_stream_params import DataAnalystStreamParams as DataAnalystStreamParams
43
- from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetStatsParams
44
- from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
45
32
  from .material_batch_create_params import MaterialBatchCreateParams as MaterialBatchCreateParams
46
- from .scenario_submit_answer_params import ScenarioSubmitAnswerParams as ScenarioSubmitAnswerParams
47
- from .flashcard_batch_process_params import FlashcardBatchProcessParams as FlashcardBatchProcessParams
48
33
  from .material_batch_create_response import MaterialBatchCreateResponse as MaterialBatchCreateResponse
49
34
  from .assignment_grader_create_params import AssignmentGraderCreateParams as AssignmentGraderCreateParams
50
35
  from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
51
- from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
52
- from .data_analyst_send_message_params import DataAnalystSendMessageParams as DataAnalystSendMessageParams
53
- from .flashcard_batch_process_response import FlashcardBatchProcessResponse as FlashcardBatchProcessResponse
54
- from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse
55
36
  from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
56
37
  from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
57
38
  from .assignment_grader_get_all_response import AssignmentGraderGetAllResponse as AssignmentGraderGetAllResponse
58
39
  from .material_create_and_process_params import MaterialCreateAndProcessParams as MaterialCreateAndProcessParams
59
40
  from .material_get_download_url_response import MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse
60
- from .data_analyst_retrieve_session_params import DataAnalystRetrieveSessionParams as DataAnalystRetrieveSessionParams
41
+ from .material_generate_and_process_params import MaterialGenerateAndProcessParams as MaterialGenerateAndProcessParams
@@ -2,27 +2,59 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Iterable
6
- from typing_extensions import Literal, Annotated, TypedDict
5
+ from typing import List, Iterable
6
+ from typing_extensions import Annotated, TypedDict
7
7
 
8
8
  from ..._utils import PropertyInfo
9
9
 
10
- __all__ = ["ChatStreamParams", "Message"]
10
+ __all__ = ["ChatStreamParams", "Message", "MessageImage"]
11
11
 
12
12
 
13
13
  class ChatStreamParams(TypedDict, total=False):
14
+ id: str
15
+ """Session ID (AI SDK uses "id")"""
16
+
17
+ component_id: Annotated[str, PropertyInfo(alias="componentId")]
18
+ """Component ID"""
19
+
14
20
  context: object
21
+ """Additional context"""
22
+
23
+ group_ids: Annotated[List[str], PropertyInfo(alias="groupIds")]
24
+ """Group IDs for access control"""
15
25
 
16
- group_id: Annotated[str, PropertyInfo(alias="groupId")]
26
+ message: Message
27
+ """Single message for custom format - contains text and optional images"""
17
28
 
18
- messages: Iterable[Message]
29
+ messages: List[str]
30
+ """Messages array for AI SDK format - list of conversation messages with roles"""
31
+
32
+ session_id: Annotated[str, PropertyInfo(alias="sessionId")]
33
+ """Session ID"""
19
34
 
20
35
  user_id: Annotated[str, PropertyInfo(alias="userId")]
36
+ """User ID"""
21
37
 
22
38
  x_component_id: Annotated[str, PropertyInfo(alias="x-component-id")]
23
39
 
24
40
 
41
+ class MessageImage(TypedDict, total=False):
42
+ base64: str
43
+ """Base64 encoded image data"""
44
+
45
+ caption: str
46
+ """Caption for the image"""
47
+
48
+ mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
49
+ """MIME type of the image"""
50
+
51
+ url: str
52
+ """URL of the image"""
53
+
54
+
25
55
  class Message(TypedDict, total=False):
26
- content: str
56
+ images: Iterable[MessageImage]
57
+ """Images attached to the message"""
27
58
 
28
- role: Literal["user", "assistant", "system"]
59
+ text: str
60
+ """Text content of the message"""
@@ -11,6 +11,7 @@ __all__ = [
11
11
  "ComponentCreateParams",
12
12
  "Config",
13
13
  "ConfigChatConfigDto",
14
+ "ConfigChatConfigDtoGuardrailRule",
14
15
  "ConfigDataAnalystConfigDto",
15
16
  "ConfigFlashcardsConfigDto",
16
17
  "ConfigScenariosConfigDto",
@@ -54,6 +55,23 @@ class ComponentCreateParams(TypedDict, total=False):
54
55
  """Additional metadata"""
55
56
 
56
57
 
58
+ class ConfigChatConfigDtoGuardrailRule(TypedDict, total=False):
59
+ id: Required[str]
60
+ """Unique identifier for the rule"""
61
+
62
+ action: Required[Literal["block", "warn", "modify"]]
63
+ """Action to take when rule is triggered"""
64
+
65
+ condition: Required[str]
66
+ """Condition to check"""
67
+
68
+ description: Required[str]
69
+ """Description of the rule"""
70
+
71
+ message: str
72
+ """Message to show when rule is triggered"""
73
+
74
+
57
75
  class ConfigChatConfigDto(TypedDict, total=False):
58
76
  model: Required[str]
59
77
  """AI model to use"""
@@ -64,6 +82,9 @@ class ConfigChatConfigDto(TypedDict, total=False):
64
82
  enable_follow_ups: Annotated[bool, PropertyInfo(alias="enableFollowUps")]
65
83
  """Enable follow-up questions"""
66
84
 
85
+ enable_guardrails: Annotated[bool, PropertyInfo(alias="enableGuardrails")]
86
+ """Enable guardrails for content moderation"""
87
+
67
88
  enable_history: Annotated[bool, PropertyInfo(alias="enableHistory")]
68
89
  """Enable conversation history"""
69
90
 
@@ -79,6 +100,9 @@ class ConfigChatConfigDto(TypedDict, total=False):
79
100
  folders: List[str]
80
101
  """Folder IDs"""
81
102
 
103
+ guardrail_rules: Annotated[Iterable[ConfigChatConfigDtoGuardrailRule], PropertyInfo(alias="guardrailRules")]
104
+ """Guardrail rules for content moderation"""
105
+
82
106
  materials: List[str]
83
107
  """Material IDs"""
84
108
 
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List
6
- from typing_extensions import Annotated, TypedDict
6
+ from typing_extensions import Required, Annotated, TypedDict
7
7
 
8
8
  from ..._utils import PropertyInfo
9
9
 
@@ -37,12 +37,18 @@ class ComponentGenerateEmbedParams(TypedDict, total=False):
37
37
 
38
38
 
39
39
  class Features(TypedDict, total=False):
40
+ enable_bad_words_filter: Required[Annotated[bool, PropertyInfo(alias="enableBadWordsFilter")]]
41
+ """Enable bad words filter"""
42
+
40
43
  enable_component_creation: Annotated[bool, PropertyInfo(alias="enableComponentCreation")]
41
44
  """Enable component creation"""
42
45
 
43
46
  enable_follow_ups: Annotated[bool, PropertyInfo(alias="enableFollowUps")]
44
47
  """Enable follow-up questions"""
45
48
 
49
+ enable_guardrails: Annotated[bool, PropertyInfo(alias="enableGuardrails")]
50
+ """Enable guardrails"""
51
+
46
52
  enable_history: Annotated[bool, PropertyInfo(alias="enableHistory")]
47
53
  """Enable history"""
48
54
 
@@ -0,0 +1,65 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = ["GeneratedMaterial", "Content"]
12
+
13
+
14
+ class Content(BaseModel):
15
+ filename: Optional[str] = None
16
+
17
+ file_size: Optional[float] = FieldInfo(alias="fileSize", default=None)
18
+
19
+ mime_type: Optional[str] = FieldInfo(alias="mimeType", default=None)
20
+
21
+ s3_key: Optional[str] = FieldInfo(alias="s3Key", default=None)
22
+
23
+ s3_url: Optional[str] = FieldInfo(alias="s3Url", default=None)
24
+
25
+ text: Optional[str] = None
26
+
27
+ url: Optional[str] = None
28
+
29
+
30
+ class GeneratedMaterial(BaseModel):
31
+ api_id: str = FieldInfo(alias="_id")
32
+ """Material ID"""
33
+
34
+ content: Content
35
+ """Material content"""
36
+
37
+ content_type: Literal["text", "pdf", "video", "audio", "image", "epub"] = FieldInfo(alias="contentType")
38
+ """Content type"""
39
+
40
+ created_at: datetime = FieldInfo(alias="createdAt")
41
+ """Creation timestamp"""
42
+
43
+ folder_id: Optional[str] = FieldInfo(alias="folderId", default=None)
44
+ """Folder ID"""
45
+
46
+ name: str
47
+ """Material name"""
48
+
49
+ organization_id: str = FieldInfo(alias="organizationId")
50
+ """Organization ID"""
51
+
52
+ status: Literal["active", "processing", "pending_upload", "error", "deleted"]
53
+ """Material status"""
54
+
55
+ updated_at: datetime = FieldInfo(alias="updatedAt")
56
+ """Last update timestamp"""
57
+
58
+ generation_metadata: Optional[object] = FieldInfo(alias="generationMetadata", default=None)
59
+ """Generation metadata"""
60
+
61
+ metadata: Optional[object] = None
62
+ """Material metadata"""
63
+
64
+ usage: Optional[object] = None
65
+ """Usage information"""
@@ -0,0 +1,38 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["MaterialGenerateAndProcessParams"]
10
+
11
+
12
+ class MaterialGenerateAndProcessParams(TypedDict, total=False):
13
+ name: Required[str]
14
+ """Name for the generated material"""
15
+
16
+ topic: Required[str]
17
+ """Topic or context to generate material from"""
18
+
19
+ type: Required[Literal["outline", "overview", "notes", "summary"]]
20
+ """Type of material to generate"""
21
+
22
+ context: str
23
+ """Additional context or details about the topic"""
24
+
25
+ folder_id: Annotated[str, PropertyInfo(alias="folderId")]
26
+ """Target folder ID"""
27
+
28
+ length: Literal["short", "medium", "long"]
29
+ """Length of the generated content"""
30
+
31
+ level: Literal["high_school", "college", "professional"]
32
+ """Target education level"""
33
+
34
+ poll_interval_ms: Annotated[float, PropertyInfo(alias="pollIntervalMs")]
35
+ """Polling interval in milliseconds (default: 2 seconds)"""
36
+
37
+ timeout_ms: Annotated[float, PropertyInfo(alias="timeoutMs")]
38
+ """Maximum time to wait for processing in milliseconds (default: 5 minutes)"""