studyfetch-sdk 0.1.0a18__py3-none-any.whl → 0.1.0a19__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.
- studyfetch_sdk/_models.py +1 -1
- studyfetch_sdk/_version.py +1 -1
- studyfetch_sdk/resources/v1/__init__.py +14 -0
- studyfetch_sdk/resources/v1/assignment_grader.py +81 -1
- studyfetch_sdk/resources/v1/components.py +36 -4
- studyfetch_sdk/resources/v1/data_analyst/__init__.py +47 -0
- studyfetch_sdk/resources/v1/data_analyst/data_analyst.py +582 -0
- studyfetch_sdk/resources/v1/data_analyst/sessions.py +222 -0
- studyfetch_sdk/resources/v1/data_analyst/test.py +190 -0
- studyfetch_sdk/resources/v1/materials/materials.py +130 -2
- studyfetch_sdk/resources/v1/materials/upload.py +262 -0
- studyfetch_sdk/resources/v1/usage/analyst.py +143 -15
- studyfetch_sdk/resources/v1/v1.py +98 -0
- studyfetch_sdk/types/v1/__init__.py +5 -0
- studyfetch_sdk/types/v1/assignment_grader_response.py +20 -1
- studyfetch_sdk/types/v1/component.py +9 -1
- studyfetch_sdk/types/v1/component_create_params.py +57 -1
- studyfetch_sdk/types/v1/component_list_params.py +9 -1
- studyfetch_sdk/types/v1/content_param.py +23 -0
- studyfetch_sdk/types/v1/data_analyst/__init__.py +5 -0
- studyfetch_sdk/types/v1/data_analyst/session_retrieve_params.py +11 -0
- studyfetch_sdk/types/v1/data_analyst_retrieve_session_params.py +13 -0
- studyfetch_sdk/types/v1/data_analyst_send_message_params.py +54 -0
- studyfetch_sdk/types/v1/data_analyst_stream_params.py +28 -0
- studyfetch_sdk/types/v1/material_create_and_process_params.py +27 -0
- studyfetch_sdk/types/v1/material_create_params.py +4 -17
- studyfetch_sdk/types/v1/materials/__init__.py +2 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +26 -0
- studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +26 -0
- studyfetch_sdk/types/v1/usage/__init__.py +3 -0
- studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +18 -0
- studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +18 -0
- studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +35 -0
- studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +7 -0
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/METADATA +1 -1
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/RECORD +38 -22
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/licenses/LICENSE +0 -0
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
import httpx
|
6
|
+
|
5
7
|
from .folders import (
|
6
8
|
FoldersResource,
|
7
9
|
AsyncFoldersResource,
|
@@ -10,6 +12,7 @@ from .folders import (
|
|
10
12
|
FoldersResourceWithStreamingResponse,
|
11
13
|
AsyncFoldersResourceWithStreamingResponse,
|
12
14
|
)
|
15
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
13
16
|
from ..._compat import cached_property
|
14
17
|
from .chat.chat import (
|
15
18
|
ChatResource,
|
@@ -44,6 +47,12 @@ from .flashcards import (
|
|
44
47
|
AsyncFlashcardsResourceWithStreamingResponse,
|
45
48
|
)
|
46
49
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
50
|
+
from ..._response import (
|
51
|
+
to_raw_response_wrapper,
|
52
|
+
to_streamed_response_wrapper,
|
53
|
+
async_to_raw_response_wrapper,
|
54
|
+
async_to_streamed_response_wrapper,
|
55
|
+
)
|
47
56
|
from .embed.embed import (
|
48
57
|
EmbedResource,
|
49
58
|
AsyncEmbedResource,
|
@@ -76,6 +85,7 @@ from .upload.upload import (
|
|
76
85
|
UploadResourceWithStreamingResponse,
|
77
86
|
AsyncUploadResourceWithStreamingResponse,
|
78
87
|
)
|
88
|
+
from ..._base_client import make_request_options
|
79
89
|
from .assignment_grader import (
|
80
90
|
AssignmentGraderResource,
|
81
91
|
AsyncAssignmentGraderResource,
|
@@ -108,6 +118,14 @@ from .audio_recaps.audio_recaps import (
|
|
108
118
|
AudioRecapsResourceWithStreamingResponse,
|
109
119
|
AsyncAudioRecapsResourceWithStreamingResponse,
|
110
120
|
)
|
121
|
+
from .data_analyst.data_analyst import (
|
122
|
+
DataAnalystResource,
|
123
|
+
AsyncDataAnalystResource,
|
124
|
+
DataAnalystResourceWithRawResponse,
|
125
|
+
AsyncDataAnalystResourceWithRawResponse,
|
126
|
+
DataAnalystResourceWithStreamingResponse,
|
127
|
+
AsyncDataAnalystResourceWithStreamingResponse,
|
128
|
+
)
|
111
129
|
|
112
130
|
__all__ = ["V1Resource", "AsyncV1Resource"]
|
113
131
|
|
@@ -165,6 +183,10 @@ class V1Resource(SyncAPIResource):
|
|
165
183
|
def assignment_grader(self) -> AssignmentGraderResource:
|
166
184
|
return AssignmentGraderResource(self._client)
|
167
185
|
|
186
|
+
@cached_property
|
187
|
+
def data_analyst(self) -> DataAnalystResource:
|
188
|
+
return DataAnalystResource(self._client)
|
189
|
+
|
168
190
|
@cached_property
|
169
191
|
def with_raw_response(self) -> V1ResourceWithRawResponse:
|
170
192
|
"""
|
@@ -184,6 +206,26 @@ class V1Resource(SyncAPIResource):
|
|
184
206
|
"""
|
185
207
|
return V1ResourceWithStreamingResponse(self)
|
186
208
|
|
209
|
+
def test_mongodb(
|
210
|
+
self,
|
211
|
+
*,
|
212
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
213
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
214
|
+
extra_headers: Headers | None = None,
|
215
|
+
extra_query: Query | None = None,
|
216
|
+
extra_body: Body | None = None,
|
217
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
218
|
+
) -> None:
|
219
|
+
"""Test MongoDB connection and get outbound IP"""
|
220
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
221
|
+
return self._get(
|
222
|
+
"/api/v1/test-mongodb",
|
223
|
+
options=make_request_options(
|
224
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
225
|
+
),
|
226
|
+
cast_to=NoneType,
|
227
|
+
)
|
228
|
+
|
187
229
|
|
188
230
|
class AsyncV1Resource(AsyncAPIResource):
|
189
231
|
@cached_property
|
@@ -238,6 +280,10 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
238
280
|
def assignment_grader(self) -> AsyncAssignmentGraderResource:
|
239
281
|
return AsyncAssignmentGraderResource(self._client)
|
240
282
|
|
283
|
+
@cached_property
|
284
|
+
def data_analyst(self) -> AsyncDataAnalystResource:
|
285
|
+
return AsyncDataAnalystResource(self._client)
|
286
|
+
|
241
287
|
@cached_property
|
242
288
|
def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
|
243
289
|
"""
|
@@ -257,11 +303,35 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
257
303
|
"""
|
258
304
|
return AsyncV1ResourceWithStreamingResponse(self)
|
259
305
|
|
306
|
+
async def test_mongodb(
|
307
|
+
self,
|
308
|
+
*,
|
309
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
310
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
311
|
+
extra_headers: Headers | None = None,
|
312
|
+
extra_query: Query | None = None,
|
313
|
+
extra_body: Body | None = None,
|
314
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
315
|
+
) -> None:
|
316
|
+
"""Test MongoDB connection and get outbound IP"""
|
317
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
318
|
+
return await self._get(
|
319
|
+
"/api/v1/test-mongodb",
|
320
|
+
options=make_request_options(
|
321
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
322
|
+
),
|
323
|
+
cast_to=NoneType,
|
324
|
+
)
|
325
|
+
|
260
326
|
|
261
327
|
class V1ResourceWithRawResponse:
|
262
328
|
def __init__(self, v1: V1Resource) -> None:
|
263
329
|
self._v1 = v1
|
264
330
|
|
331
|
+
self.test_mongodb = to_raw_response_wrapper(
|
332
|
+
v1.test_mongodb,
|
333
|
+
)
|
334
|
+
|
265
335
|
@cached_property
|
266
336
|
def materials(self) -> MaterialsResourceWithRawResponse:
|
267
337
|
return MaterialsResourceWithRawResponse(self._v1.materials)
|
@@ -314,11 +384,19 @@ class V1ResourceWithRawResponse:
|
|
314
384
|
def assignment_grader(self) -> AssignmentGraderResourceWithRawResponse:
|
315
385
|
return AssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
|
316
386
|
|
387
|
+
@cached_property
|
388
|
+
def data_analyst(self) -> DataAnalystResourceWithRawResponse:
|
389
|
+
return DataAnalystResourceWithRawResponse(self._v1.data_analyst)
|
390
|
+
|
317
391
|
|
318
392
|
class AsyncV1ResourceWithRawResponse:
|
319
393
|
def __init__(self, v1: AsyncV1Resource) -> None:
|
320
394
|
self._v1 = v1
|
321
395
|
|
396
|
+
self.test_mongodb = async_to_raw_response_wrapper(
|
397
|
+
v1.test_mongodb,
|
398
|
+
)
|
399
|
+
|
322
400
|
@cached_property
|
323
401
|
def materials(self) -> AsyncMaterialsResourceWithRawResponse:
|
324
402
|
return AsyncMaterialsResourceWithRawResponse(self._v1.materials)
|
@@ -371,11 +449,19 @@ class AsyncV1ResourceWithRawResponse:
|
|
371
449
|
def assignment_grader(self) -> AsyncAssignmentGraderResourceWithRawResponse:
|
372
450
|
return AsyncAssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
|
373
451
|
|
452
|
+
@cached_property
|
453
|
+
def data_analyst(self) -> AsyncDataAnalystResourceWithRawResponse:
|
454
|
+
return AsyncDataAnalystResourceWithRawResponse(self._v1.data_analyst)
|
455
|
+
|
374
456
|
|
375
457
|
class V1ResourceWithStreamingResponse:
|
376
458
|
def __init__(self, v1: V1Resource) -> None:
|
377
459
|
self._v1 = v1
|
378
460
|
|
461
|
+
self.test_mongodb = to_streamed_response_wrapper(
|
462
|
+
v1.test_mongodb,
|
463
|
+
)
|
464
|
+
|
379
465
|
@cached_property
|
380
466
|
def materials(self) -> MaterialsResourceWithStreamingResponse:
|
381
467
|
return MaterialsResourceWithStreamingResponse(self._v1.materials)
|
@@ -428,11 +514,19 @@ class V1ResourceWithStreamingResponse:
|
|
428
514
|
def assignment_grader(self) -> AssignmentGraderResourceWithStreamingResponse:
|
429
515
|
return AssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
|
430
516
|
|
517
|
+
@cached_property
|
518
|
+
def data_analyst(self) -> DataAnalystResourceWithStreamingResponse:
|
519
|
+
return DataAnalystResourceWithStreamingResponse(self._v1.data_analyst)
|
520
|
+
|
431
521
|
|
432
522
|
class AsyncV1ResourceWithStreamingResponse:
|
433
523
|
def __init__(self, v1: AsyncV1Resource) -> None:
|
434
524
|
self._v1 = v1
|
435
525
|
|
526
|
+
self.test_mongodb = async_to_streamed_response_wrapper(
|
527
|
+
v1.test_mongodb,
|
528
|
+
)
|
529
|
+
|
436
530
|
@cached_property
|
437
531
|
def materials(self) -> AsyncMaterialsResourceWithStreamingResponse:
|
438
532
|
return AsyncMaterialsResourceWithStreamingResponse(self._v1.materials)
|
@@ -484,3 +578,7 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
484
578
|
@cached_property
|
485
579
|
def assignment_grader(self) -> AsyncAssignmentGraderResourceWithStreamingResponse:
|
486
580
|
return AsyncAssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
|
581
|
+
|
582
|
+
@cached_property
|
583
|
+
def data_analyst(self) -> AsyncDataAnalystResourceWithStreamingResponse:
|
584
|
+
return AsyncDataAnalystResourceWithStreamingResponse(self._v1.data_analyst)
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
from .material import Material as Material
|
6
6
|
from .component import Component as Component
|
7
|
+
from .content_param import ContentParam as ContentParam
|
7
8
|
from .chat_stream_params import ChatStreamParams as ChatStreamParams
|
8
9
|
from .folder_list_params import FolderListParams as FolderListParams
|
9
10
|
from .test_create_params import TestCreateParams as TestCreateParams
|
@@ -38,6 +39,7 @@ from .usage_get_summary_params import UsageGetSummaryParams as UsageGetSummaryPa
|
|
38
39
|
from .usage_list_events_params import UsageListEventsParams as UsageListEventsParams
|
39
40
|
from .test_submit_answer_params import TestSubmitAnswerParams as TestSubmitAnswerParams
|
40
41
|
from .assignment_grader_response import AssignmentGraderResponse as AssignmentGraderResponse
|
42
|
+
from .data_analyst_stream_params import DataAnalystStreamParams as DataAnalystStreamParams
|
41
43
|
from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetStatsParams
|
42
44
|
from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
|
43
45
|
from .material_batch_create_params import MaterialBatchCreateParams as MaterialBatchCreateParams
|
@@ -47,9 +49,12 @@ from .material_batch_create_response import MaterialBatchCreateResponse as Mater
|
|
47
49
|
from .assignment_grader_create_params import AssignmentGraderCreateParams as AssignmentGraderCreateParams
|
48
50
|
from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
|
49
51
|
from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
|
52
|
+
from .data_analyst_send_message_params import DataAnalystSendMessageParams as DataAnalystSendMessageParams
|
50
53
|
from .flashcard_batch_process_response import FlashcardBatchProcessResponse as FlashcardBatchProcessResponse
|
51
54
|
from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse
|
52
55
|
from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
|
53
56
|
from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
|
54
57
|
from .assignment_grader_get_all_response import AssignmentGraderGetAllResponse as AssignmentGraderGetAllResponse
|
58
|
+
from .material_create_and_process_params import MaterialCreateAndProcessParams as MaterialCreateAndProcessParams
|
55
59
|
from .material_get_download_url_response import MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse
|
60
|
+
from .data_analyst_retrieve_session_params import DataAnalystRetrieveSessionParams as DataAnalystRetrieveSessionParams
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
from typing import Optional
|
3
4
|
from datetime import datetime
|
4
5
|
|
5
6
|
from pydantic import Field as FieldInfo
|
@@ -10,7 +11,10 @@ __all__ = ["AssignmentGraderResponse"]
|
|
10
11
|
|
11
12
|
|
12
13
|
class AssignmentGraderResponse(BaseModel):
|
13
|
-
|
14
|
+
api_v: float = FieldInfo(alias="__v")
|
15
|
+
"""Version key"""
|
16
|
+
|
17
|
+
api_id: str = FieldInfo(alias="_id")
|
14
18
|
"""Assignment grader ID"""
|
15
19
|
|
16
20
|
created_at: datetime = FieldInfo(alias="createdAt")
|
@@ -19,8 +23,23 @@ class AssignmentGraderResponse(BaseModel):
|
|
19
23
|
grade: float
|
20
24
|
"""Overall grade percentage"""
|
21
25
|
|
26
|
+
organization_id: str = FieldInfo(alias="organizationId")
|
27
|
+
"""Organization ID"""
|
28
|
+
|
22
29
|
rubric: object
|
23
30
|
"""Grading results"""
|
24
31
|
|
25
32
|
title: str
|
26
33
|
"""Assignment title"""
|
34
|
+
|
35
|
+
updated_at: datetime = FieldInfo(alias="updatedAt")
|
36
|
+
"""Update timestamp"""
|
37
|
+
|
38
|
+
material_id: Optional[str] = FieldInfo(alias="materialId", default=None)
|
39
|
+
"""Material ID"""
|
40
|
+
|
41
|
+
text_to_grade: Optional[str] = FieldInfo(alias="textToGrade", default=None)
|
42
|
+
"""Text that was graded"""
|
43
|
+
|
44
|
+
user_id: Optional[str] = FieldInfo(alias="userId", default=None)
|
45
|
+
"""User ID"""
|
@@ -34,7 +34,15 @@ class Component(BaseModel):
|
|
34
34
|
"""Component status"""
|
35
35
|
|
36
36
|
type: Literal[
|
37
|
-
"chat",
|
37
|
+
"chat",
|
38
|
+
"data_analyst",
|
39
|
+
"flashcards",
|
40
|
+
"scenarios",
|
41
|
+
"practice_test",
|
42
|
+
"audio_recap",
|
43
|
+
"tutor_me",
|
44
|
+
"explainers",
|
45
|
+
"uploads",
|
38
46
|
]
|
39
47
|
"""Component type"""
|
40
48
|
|
@@ -11,6 +11,7 @@ __all__ = [
|
|
11
11
|
"ComponentCreateParams",
|
12
12
|
"Config",
|
13
13
|
"ConfigChatConfigDto",
|
14
|
+
"ConfigDataAnalystConfigDto",
|
14
15
|
"ConfigFlashcardsConfigDto",
|
15
16
|
"ConfigScenariosConfigDto",
|
16
17
|
"ConfigScenariosConfigDtoCharacter",
|
@@ -32,7 +33,17 @@ class ComponentCreateParams(TypedDict, total=False):
|
|
32
33
|
"""Name of the component"""
|
33
34
|
|
34
35
|
type: Required[
|
35
|
-
Literal[
|
36
|
+
Literal[
|
37
|
+
"chat",
|
38
|
+
"data_analyst",
|
39
|
+
"flashcards",
|
40
|
+
"scenarios",
|
41
|
+
"practice_test",
|
42
|
+
"audio_recap",
|
43
|
+
"tutor_me",
|
44
|
+
"explainers",
|
45
|
+
"uploads",
|
46
|
+
]
|
36
47
|
]
|
37
48
|
"""Type of component to create"""
|
38
49
|
|
@@ -84,6 +95,50 @@ class ConfigChatConfigDto(TypedDict, total=False):
|
|
84
95
|
"""Temperature for response generation"""
|
85
96
|
|
86
97
|
|
98
|
+
class ConfigDataAnalystConfigDto(TypedDict, total=False):
|
99
|
+
model: Required[str]
|
100
|
+
"""AI model to use"""
|
101
|
+
|
102
|
+
enable_component_creation: Annotated[bool, PropertyInfo(alias="enableComponentCreation")]
|
103
|
+
"""Enable component creation"""
|
104
|
+
|
105
|
+
enable_follow_ups: Annotated[bool, PropertyInfo(alias="enableFollowUps")]
|
106
|
+
"""Enable follow-up questions"""
|
107
|
+
|
108
|
+
enable_history: Annotated[bool, PropertyInfo(alias="enableHistory")]
|
109
|
+
"""Enable conversation history"""
|
110
|
+
|
111
|
+
enable_rag_search: Annotated[bool, PropertyInfo(alias="enableRAGSearch")]
|
112
|
+
"""Enable RAG search"""
|
113
|
+
|
114
|
+
enable_voice: Annotated[bool, PropertyInfo(alias="enableVoice")]
|
115
|
+
"""Enable voice interactions"""
|
116
|
+
|
117
|
+
enable_web_search: Annotated[bool, PropertyInfo(alias="enableWebSearch")]
|
118
|
+
"""Enable web search"""
|
119
|
+
|
120
|
+
folders: List[str]
|
121
|
+
"""Folder IDs"""
|
122
|
+
|
123
|
+
group_ids: Annotated[List[str], PropertyInfo(alias="groupIds")]
|
124
|
+
"""Group IDs to filter data"""
|
125
|
+
|
126
|
+
materials: List[str]
|
127
|
+
"""Material IDs"""
|
128
|
+
|
129
|
+
max_steps: Annotated[float, PropertyInfo(alias="maxSteps")]
|
130
|
+
"""Maximum steps for multi-step tool calls"""
|
131
|
+
|
132
|
+
max_tokens: Annotated[float, PropertyInfo(alias="maxTokens")]
|
133
|
+
"""Maximum tokens for response"""
|
134
|
+
|
135
|
+
system_prompt: Annotated[str, PropertyInfo(alias="systemPrompt")]
|
136
|
+
"""System prompt for the data analyst"""
|
137
|
+
|
138
|
+
temperature: float
|
139
|
+
"""Temperature for response generation"""
|
140
|
+
|
141
|
+
|
87
142
|
class ConfigFlashcardsConfigDto(TypedDict, total=False):
|
88
143
|
card_types: Annotated[List[str], PropertyInfo(alias="cardTypes")]
|
89
144
|
"""Types of flashcards"""
|
@@ -359,6 +414,7 @@ class ConfigTutorMeConfigDto(TypedDict, total=False):
|
|
359
414
|
|
360
415
|
Config: TypeAlias = Union[
|
361
416
|
ConfigChatConfigDto,
|
417
|
+
ConfigDataAnalystConfigDto,
|
362
418
|
ConfigFlashcardsConfigDto,
|
363
419
|
ConfigScenariosConfigDto,
|
364
420
|
ConfigPracticeTestConfigDto,
|
@@ -9,6 +9,14 @@ __all__ = ["ComponentListParams"]
|
|
9
9
|
|
10
10
|
class ComponentListParams(TypedDict, total=False):
|
11
11
|
type: Literal[
|
12
|
-
"chat",
|
12
|
+
"chat",
|
13
|
+
"data_analyst",
|
14
|
+
"flashcards",
|
15
|
+
"scenarios",
|
16
|
+
"practice_test",
|
17
|
+
"audio_recap",
|
18
|
+
"tutor_me",
|
19
|
+
"explainers",
|
20
|
+
"uploads",
|
13
21
|
]
|
14
22
|
"""Filter by component type"""
|
@@ -0,0 +1,23 @@
|
|
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__ = ["ContentParam"]
|
10
|
+
|
11
|
+
|
12
|
+
class ContentParam(TypedDict, total=False):
|
13
|
+
type: Required[Literal["text", "pdf", "video", "audio", "url"]]
|
14
|
+
"""Type of content"""
|
15
|
+
|
16
|
+
source_url: Annotated[str, PropertyInfo(alias="sourceUrl")]
|
17
|
+
"""URL to fetch content from"""
|
18
|
+
|
19
|
+
text: str
|
20
|
+
"""Text content (for text type)"""
|
21
|
+
|
22
|
+
url: str
|
23
|
+
"""URL to the content (for url type)"""
|
@@ -0,0 +1,11 @@
|
|
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 Required, TypedDict
|
6
|
+
|
7
|
+
__all__ = ["SessionRetrieveParams"]
|
8
|
+
|
9
|
+
|
10
|
+
class SessionRetrieveParams(TypedDict, total=False):
|
11
|
+
limit: Required[str]
|
@@ -0,0 +1,13 @@
|
|
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 Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ..._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["DataAnalystRetrieveSessionParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class DataAnalystRetrieveSessionParams(TypedDict, total=False):
|
13
|
+
user_id: Required[Annotated[str, PropertyInfo(alias="userId")]]
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import List, Iterable
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from ..._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["DataAnalystSendMessageParams", "Message", "MessageImage"]
|
11
|
+
|
12
|
+
|
13
|
+
class DataAnalystSendMessageParams(TypedDict, total=False):
|
14
|
+
component_id: Required[Annotated[str, PropertyInfo(alias="componentId")]]
|
15
|
+
"""Component ID for context"""
|
16
|
+
|
17
|
+
message: Required[Message]
|
18
|
+
"""Chat message content"""
|
19
|
+
|
20
|
+
x_component_id: Required[Annotated[str, PropertyInfo(alias="x-component-id")]]
|
21
|
+
|
22
|
+
context: object
|
23
|
+
"""Additional context data"""
|
24
|
+
|
25
|
+
group_ids: Annotated[List[str], PropertyInfo(alias="groupIds")]
|
26
|
+
"""Group IDs for collaboration"""
|
27
|
+
|
28
|
+
session_id: Annotated[str, PropertyInfo(alias="sessionId")]
|
29
|
+
"""Session ID for conversation continuity"""
|
30
|
+
|
31
|
+
user_id: Annotated[str, PropertyInfo(alias="userId")]
|
32
|
+
"""User ID for tracking"""
|
33
|
+
|
34
|
+
|
35
|
+
class MessageImage(TypedDict, total=False):
|
36
|
+
base64: str
|
37
|
+
"""Base64 encoded image data"""
|
38
|
+
|
39
|
+
caption: str
|
40
|
+
"""Caption for the image"""
|
41
|
+
|
42
|
+
mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
|
43
|
+
"""MIME type of the image"""
|
44
|
+
|
45
|
+
url: str
|
46
|
+
"""URL of the image"""
|
47
|
+
|
48
|
+
|
49
|
+
class Message(TypedDict, total=False):
|
50
|
+
images: Iterable[MessageImage]
|
51
|
+
"""Images attached to the message"""
|
52
|
+
|
53
|
+
text: str
|
54
|
+
"""Text content of the message"""
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Iterable
|
6
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
7
|
+
|
8
|
+
from ..._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["DataAnalystStreamParams", "Message"]
|
11
|
+
|
12
|
+
|
13
|
+
class DataAnalystStreamParams(TypedDict, total=False):
|
14
|
+
context: object
|
15
|
+
|
16
|
+
group_id: Annotated[str, PropertyInfo(alias="groupId")]
|
17
|
+
|
18
|
+
messages: Iterable[Message]
|
19
|
+
|
20
|
+
user_id: Annotated[str, PropertyInfo(alias="userId")]
|
21
|
+
|
22
|
+
x_component_id: Annotated[str, PropertyInfo(alias="x-component-id")]
|
23
|
+
|
24
|
+
|
25
|
+
class Message(TypedDict, total=False):
|
26
|
+
content: str
|
27
|
+
|
28
|
+
role: Literal["user", "assistant", "system"]
|
@@ -0,0 +1,27 @@
|
|
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 Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ..._utils import PropertyInfo
|
8
|
+
from .content_param import ContentParam
|
9
|
+
|
10
|
+
__all__ = ["MaterialCreateAndProcessParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class MaterialCreateAndProcessParams(TypedDict, total=False):
|
14
|
+
content: Required[ContentParam]
|
15
|
+
"""Content details"""
|
16
|
+
|
17
|
+
name: Required[str]
|
18
|
+
"""Name of the material"""
|
19
|
+
|
20
|
+
folder_id: Annotated[str, PropertyInfo(alias="folderId")]
|
21
|
+
"""Folder ID to place the material in"""
|
22
|
+
|
23
|
+
poll_interval_ms: Annotated[float, PropertyInfo(alias="pollIntervalMs")]
|
24
|
+
"""Polling interval in milliseconds (default: 2 seconds)"""
|
25
|
+
|
26
|
+
timeout_ms: Annotated[float, PropertyInfo(alias="timeoutMs")]
|
27
|
+
"""Maximum time to wait for processing in milliseconds (default: 5 minutes)"""
|
@@ -2,15 +2,16 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from typing_extensions import
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
6
6
|
|
7
7
|
from ..._utils import PropertyInfo
|
8
|
+
from .content_param import ContentParam
|
8
9
|
|
9
|
-
__all__ = ["MaterialCreateParams"
|
10
|
+
__all__ = ["MaterialCreateParams"]
|
10
11
|
|
11
12
|
|
12
13
|
class MaterialCreateParams(TypedDict, total=False):
|
13
|
-
content: Required[
|
14
|
+
content: Required[ContentParam]
|
14
15
|
"""Content details"""
|
15
16
|
|
16
17
|
name: Required[str]
|
@@ -18,17 +19,3 @@ class MaterialCreateParams(TypedDict, total=False):
|
|
18
19
|
|
19
20
|
folder_id: Annotated[str, PropertyInfo(alias="folderId")]
|
20
21
|
"""Folder ID to place the material in"""
|
21
|
-
|
22
|
-
|
23
|
-
class Content(TypedDict, total=False):
|
24
|
-
type: Required[Literal["text", "pdf", "video", "audio", "url"]]
|
25
|
-
"""Type of content"""
|
26
|
-
|
27
|
-
source_url: Annotated[str, PropertyInfo(alias="sourceUrl")]
|
28
|
-
"""URL to fetch content from"""
|
29
|
-
|
30
|
-
text: str
|
31
|
-
"""Text content (for text type)"""
|
32
|
-
|
33
|
-
url: str
|
34
|
-
"""URL to the content (for url type)"""
|
@@ -13,3 +13,5 @@ from .upload_complete_upload_params import UploadCompleteUploadParams as UploadC
|
|
13
13
|
from .upload_upload_from_url_params import UploadUploadFromURLParams as UploadUploadFromURLParams
|
14
14
|
from .upload_create_presigned_url_params import UploadCreatePresignedURLParams as UploadCreatePresignedURLParams
|
15
15
|
from .upload_create_presigned_url_response import UploadCreatePresignedURLResponse as UploadCreatePresignedURLResponse
|
16
|
+
from .upload_upload_url_and_process_params import UploadUploadURLAndProcessParams as UploadUploadURLAndProcessParams
|
17
|
+
from .upload_upload_file_and_process_params import UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams
|
@@ -0,0 +1,26 @@
|
|
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 Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ...._types import FileTypes
|
8
|
+
from ...._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["UploadUploadFileAndProcessParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class UploadUploadFileAndProcessParams(TypedDict, total=False):
|
14
|
+
file: Required[FileTypes]
|
15
|
+
|
16
|
+
name: Required[str]
|
17
|
+
"""Material name"""
|
18
|
+
|
19
|
+
folder_id: Annotated[str, PropertyInfo(alias="folderId")]
|
20
|
+
"""Folder ID (optional)"""
|
21
|
+
|
22
|
+
poll_interval_ms: Annotated[float, PropertyInfo(alias="pollIntervalMs")]
|
23
|
+
"""Polling interval in milliseconds (default: 2000)"""
|
24
|
+
|
25
|
+
timeout_ms: Annotated[float, PropertyInfo(alias="timeoutMs")]
|
26
|
+
"""Processing timeout in milliseconds (default: 300000)"""
|
@@ -0,0 +1,26 @@
|
|
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 Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ...._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["UploadUploadURLAndProcessParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class UploadUploadURLAndProcessParams(TypedDict, total=False):
|
13
|
+
name: Required[str]
|
14
|
+
"""Material name"""
|
15
|
+
|
16
|
+
url: Required[str]
|
17
|
+
"""URL to fetch content from"""
|
18
|
+
|
19
|
+
folder_id: Annotated[str, PropertyInfo(alias="folderId")]
|
20
|
+
"""Folder ID (optional)"""
|
21
|
+
|
22
|
+
poll_interval_ms: Annotated[float, PropertyInfo(alias="pollIntervalMs")]
|
23
|
+
"""Polling interval in milliseconds (default: 2 seconds)"""
|
24
|
+
|
25
|
+
timeout_ms: Annotated[float, PropertyInfo(alias="timeoutMs")]
|
26
|
+
"""Maximum time to wait for processing in milliseconds (default: 5 minutes)"""
|
@@ -3,3 +3,6 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
5
|
from .analyst_list_events_params import AnalystListEventsParams as AnalystListEventsParams
|
6
|
+
from .analyst_get_test_questions_params import AnalystGetTestQuestionsParams as AnalystGetTestQuestionsParams
|
7
|
+
from .analyst_list_chat_messages_params import AnalystListChatMessagesParams as AnalystListChatMessagesParams
|
8
|
+
from .analyst_list_chat_messages_response import AnalystListChatMessagesResponse as AnalystListChatMessagesResponse
|