studyfetch-sdk 0.1.0a18__py3-none-any.whl → 0.1.0a20__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 (78) hide show
  1. studyfetch_sdk/_models.py +24 -3
  2. studyfetch_sdk/_version.py +1 -1
  3. studyfetch_sdk/resources/v1/__init__.py +0 -84
  4. studyfetch_sdk/resources/v1/assignment_grader.py +81 -1
  5. studyfetch_sdk/resources/v1/components.py +36 -4
  6. studyfetch_sdk/resources/v1/materials/materials.py +130 -2
  7. studyfetch_sdk/resources/v1/materials/upload.py +286 -0
  8. studyfetch_sdk/resources/v1/usage/analyst.py +143 -15
  9. studyfetch_sdk/resources/v1/v1.py +66 -192
  10. studyfetch_sdk/types/v1/__init__.py +2 -20
  11. studyfetch_sdk/types/v1/assignment_grader_response.py +20 -1
  12. studyfetch_sdk/types/v1/component.py +9 -1
  13. studyfetch_sdk/types/v1/component_create_params.py +81 -1
  14. studyfetch_sdk/types/v1/component_generate_embed_params.py +7 -1
  15. studyfetch_sdk/types/v1/component_list_params.py +9 -1
  16. studyfetch_sdk/types/v1/content_param.py +23 -0
  17. studyfetch_sdk/types/v1/material_create_and_process_params.py +27 -0
  18. studyfetch_sdk/types/v1/material_create_params.py +4 -17
  19. studyfetch_sdk/types/v1/materials/__init__.py +2 -0
  20. studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +3 -0
  21. studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +29 -0
  22. studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +3 -0
  23. studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +26 -0
  24. studyfetch_sdk/types/v1/usage/__init__.py +3 -0
  25. studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +18 -0
  26. studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +18 -0
  27. studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +35 -0
  28. studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +7 -0
  29. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/METADATA +1 -1
  30. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/RECORD +32 -71
  31. studyfetch_sdk/resources/v1/audio_recaps/__init__.py +0 -33
  32. studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +0 -328
  33. studyfetch_sdk/resources/v1/audio_recaps/sections.py +0 -250
  34. studyfetch_sdk/resources/v1/chat/__init__.py +0 -47
  35. studyfetch_sdk/resources/v1/chat/chat.py +0 -574
  36. studyfetch_sdk/resources/v1/chat/sessions.py +0 -222
  37. studyfetch_sdk/resources/v1/chat/test.py +0 -190
  38. studyfetch_sdk/resources/v1/explainers.py +0 -441
  39. studyfetch_sdk/resources/v1/flashcards.py +0 -783
  40. studyfetch_sdk/resources/v1/scenarios/__init__.py +0 -61
  41. studyfetch_sdk/resources/v1/scenarios/component.py +0 -426
  42. studyfetch_sdk/resources/v1/scenarios/scenarios.py +0 -936
  43. studyfetch_sdk/resources/v1/scenarios/sessions.py +0 -236
  44. studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +0 -33
  45. studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +0 -102
  46. studyfetch_sdk/resources/v1/scenarios/submissions/user.py +0 -210
  47. studyfetch_sdk/resources/v1/tests/__init__.py +0 -33
  48. studyfetch_sdk/resources/v1/tests/component.py +0 -160
  49. studyfetch_sdk/resources/v1/tests/tests.py +0 -682
  50. studyfetch_sdk/types/v1/audio_recaps/__init__.py +0 -3
  51. studyfetch_sdk/types/v1/chat/__init__.py +0 -5
  52. studyfetch_sdk/types/v1/chat/session_retrieve_params.py +0 -11
  53. studyfetch_sdk/types/v1/chat_get_session_params.py +0 -13
  54. studyfetch_sdk/types/v1/chat_send_message_params.py +0 -54
  55. studyfetch_sdk/types/v1/chat_stream_params.py +0 -28
  56. studyfetch_sdk/types/v1/explainer_create_params.py +0 -45
  57. studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +0 -53
  58. studyfetch_sdk/types/v1/flashcard_batch_process_params.py +0 -36
  59. studyfetch_sdk/types/v1/flashcard_batch_process_response.py +0 -39
  60. studyfetch_sdk/types/v1/flashcard_get_algorithm_response.py +0 -37
  61. studyfetch_sdk/types/v1/flashcard_get_all_params.py +0 -23
  62. studyfetch_sdk/types/v1/flashcard_get_due_params.py +0 -19
  63. studyfetch_sdk/types/v1/flashcard_get_stats_params.py +0 -17
  64. studyfetch_sdk/types/v1/flashcard_get_types_response.py +0 -14
  65. studyfetch_sdk/types/v1/flashcard_rate_params.py +0 -23
  66. studyfetch_sdk/types/v1/scenario_create_params.py +0 -48
  67. studyfetch_sdk/types/v1/scenario_submit_answer_params.py +0 -18
  68. studyfetch_sdk/types/v1/scenario_update_params.py +0 -45
  69. studyfetch_sdk/types/v1/scenarios/__init__.py +0 -5
  70. studyfetch_sdk/types/v1/scenarios/component_update_params.py +0 -45
  71. studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +0 -3
  72. studyfetch_sdk/types/v1/test_create_params.py +0 -20
  73. studyfetch_sdk/types/v1/test_retake_params.py +0 -14
  74. studyfetch_sdk/types/v1/test_submit_answer_params.py +0 -20
  75. studyfetch_sdk/types/v1/test_submit_params.py +0 -14
  76. studyfetch_sdk/types/v1/tests/__init__.py +0 -3
  77. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/WHEEL +0 -0
  78. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/licenses/LICENSE +0 -0
@@ -1,574 +0,0 @@
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
-
7
- import httpx
8
-
9
- from .test import (
10
- TestResource,
11
- AsyncTestResource,
12
- TestResourceWithRawResponse,
13
- AsyncTestResourceWithRawResponse,
14
- TestResourceWithStreamingResponse,
15
- AsyncTestResourceWithStreamingResponse,
16
- )
17
- from .sessions import (
18
- SessionsResource,
19
- AsyncSessionsResource,
20
- SessionsResourceWithRawResponse,
21
- AsyncSessionsResourceWithRawResponse,
22
- SessionsResourceWithStreamingResponse,
23
- AsyncSessionsResourceWithStreamingResponse,
24
- )
25
- from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
26
- from ...._utils import maybe_transform, strip_not_given, async_maybe_transform
27
- from ...._compat import cached_property
28
- from ....types.v1 import chat_stream_params, chat_get_session_params, chat_send_message_params
29
- from ...._resource import SyncAPIResource, AsyncAPIResource
30
- from ...._response import (
31
- to_raw_response_wrapper,
32
- to_streamed_response_wrapper,
33
- async_to_raw_response_wrapper,
34
- async_to_streamed_response_wrapper,
35
- )
36
- from ...._base_client import make_request_options
37
-
38
- __all__ = ["ChatResource", "AsyncChatResource"]
39
-
40
-
41
- class ChatResource(SyncAPIResource):
42
- @cached_property
43
- def sessions(self) -> SessionsResource:
44
- return SessionsResource(self._client)
45
-
46
- @cached_property
47
- def test(self) -> TestResource:
48
- return TestResource(self._client)
49
-
50
- @cached_property
51
- def with_raw_response(self) -> ChatResourceWithRawResponse:
52
- """
53
- This property can be used as a prefix for any HTTP method call to return
54
- the raw response object instead of the parsed content.
55
-
56
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
57
- """
58
- return ChatResourceWithRawResponse(self)
59
-
60
- @cached_property
61
- def with_streaming_response(self) -> ChatResourceWithStreamingResponse:
62
- """
63
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
64
-
65
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
66
- """
67
- return ChatResourceWithStreamingResponse(self)
68
-
69
- def get_history(
70
- self,
71
- *,
72
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
73
- # The extra values given here take precedence over values defined on the client or passed to this method.
74
- extra_headers: Headers | None = None,
75
- extra_query: Query | None = None,
76
- extra_body: Body | None = None,
77
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
78
- ) -> None:
79
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
80
- return self._post(
81
- "/api/v1/chat/history",
82
- options=make_request_options(
83
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
84
- ),
85
- cast_to=NoneType,
86
- )
87
-
88
- def get_session(
89
- self,
90
- session_id: str,
91
- *,
92
- user_id: str,
93
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
94
- # The extra values given here take precedence over values defined on the client or passed to this method.
95
- extra_headers: Headers | None = None,
96
- extra_query: Query | None = None,
97
- extra_body: Body | None = None,
98
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
99
- ) -> None:
100
- """
101
- Args:
102
- extra_headers: Send extra headers
103
-
104
- extra_query: Add additional query parameters to the request
105
-
106
- extra_body: Add additional JSON properties to the request
107
-
108
- timeout: Override the client-level default timeout for this request, in seconds
109
- """
110
- if not session_id:
111
- raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
112
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
113
- return self._get(
114
- f"/api/v1/chat/session/{session_id}",
115
- options=make_request_options(
116
- extra_headers=extra_headers,
117
- extra_query=extra_query,
118
- extra_body=extra_body,
119
- timeout=timeout,
120
- query=maybe_transform({"user_id": user_id}, chat_get_session_params.ChatGetSessionParams),
121
- ),
122
- cast_to=NoneType,
123
- )
124
-
125
- def send_followups(
126
- self,
127
- *,
128
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
129
- # The extra values given here take precedence over values defined on the client or passed to this method.
130
- extra_headers: Headers | None = None,
131
- extra_query: Query | None = None,
132
- extra_body: Body | None = None,
133
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
134
- ) -> None:
135
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
136
- return self._post(
137
- "/api/v1/chat/followups",
138
- options=make_request_options(
139
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
140
- ),
141
- cast_to=NoneType,
142
- )
143
-
144
- def send_message(
145
- self,
146
- *,
147
- component_id: str,
148
- message: chat_send_message_params.Message,
149
- x_component_id: str,
150
- context: object | NotGiven = NOT_GIVEN,
151
- group_ids: List[str] | NotGiven = NOT_GIVEN,
152
- session_id: str | NotGiven = NOT_GIVEN,
153
- user_id: str | NotGiven = NOT_GIVEN,
154
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
155
- # The extra values given here take precedence over values defined on the client or passed to this method.
156
- extra_headers: Headers | None = None,
157
- extra_query: Query | None = None,
158
- extra_body: Body | None = None,
159
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
160
- ) -> None:
161
- """
162
- Args:
163
- component_id: Component ID for context
164
-
165
- message: Chat message content
166
-
167
- context: Additional context data
168
-
169
- group_ids: Group IDs for collaboration
170
-
171
- session_id: Session ID for conversation continuity
172
-
173
- user_id: User ID for tracking
174
-
175
- extra_headers: Send extra headers
176
-
177
- extra_query: Add additional query parameters to the request
178
-
179
- extra_body: Add additional JSON properties to the request
180
-
181
- timeout: Override the client-level default timeout for this request, in seconds
182
- """
183
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
184
- extra_headers.update({"x-component-id": x_component_id})
185
- return self._post(
186
- "/api/v1/chat/message",
187
- body=maybe_transform(
188
- {
189
- "component_id": component_id,
190
- "message": message,
191
- "context": context,
192
- "group_ids": group_ids,
193
- "session_id": session_id,
194
- "user_id": user_id,
195
- },
196
- chat_send_message_params.ChatSendMessageParams,
197
- ),
198
- options=make_request_options(
199
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
200
- ),
201
- cast_to=NoneType,
202
- )
203
-
204
- def stream(
205
- self,
206
- *,
207
- context: object | NotGiven = NOT_GIVEN,
208
- group_id: str | NotGiven = NOT_GIVEN,
209
- messages: Iterable[chat_stream_params.Message] | NotGiven = NOT_GIVEN,
210
- user_id: str | NotGiven = NOT_GIVEN,
211
- x_component_id: str | NotGiven = NOT_GIVEN,
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
- """
220
- Stream chat responses
221
-
222
- Args:
223
- extra_headers: Send extra headers
224
-
225
- extra_query: Add additional query parameters to the request
226
-
227
- extra_body: Add additional JSON properties to the request
228
-
229
- timeout: Override the client-level default timeout for this request, in seconds
230
- """
231
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
232
- extra_headers = {**strip_not_given({"x-component-id": x_component_id}), **(extra_headers or {})}
233
- return self._post(
234
- "/api/v1/chat/stream",
235
- body=maybe_transform(
236
- {
237
- "context": context,
238
- "group_id": group_id,
239
- "messages": messages,
240
- "user_id": user_id,
241
- },
242
- chat_stream_params.ChatStreamParams,
243
- ),
244
- options=make_request_options(
245
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
246
- ),
247
- cast_to=NoneType,
248
- )
249
-
250
-
251
- class AsyncChatResource(AsyncAPIResource):
252
- @cached_property
253
- def sessions(self) -> AsyncSessionsResource:
254
- return AsyncSessionsResource(self._client)
255
-
256
- @cached_property
257
- def test(self) -> AsyncTestResource:
258
- return AsyncTestResource(self._client)
259
-
260
- @cached_property
261
- def with_raw_response(self) -> AsyncChatResourceWithRawResponse:
262
- """
263
- This property can be used as a prefix for any HTTP method call to return
264
- the raw response object instead of the parsed content.
265
-
266
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
267
- """
268
- return AsyncChatResourceWithRawResponse(self)
269
-
270
- @cached_property
271
- def with_streaming_response(self) -> AsyncChatResourceWithStreamingResponse:
272
- """
273
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
274
-
275
- For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
276
- """
277
- return AsyncChatResourceWithStreamingResponse(self)
278
-
279
- async def get_history(
280
- self,
281
- *,
282
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
283
- # The extra values given here take precedence over values defined on the client or passed to this method.
284
- extra_headers: Headers | None = None,
285
- extra_query: Query | None = None,
286
- extra_body: Body | None = None,
287
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
288
- ) -> None:
289
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
290
- return await self._post(
291
- "/api/v1/chat/history",
292
- options=make_request_options(
293
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
294
- ),
295
- cast_to=NoneType,
296
- )
297
-
298
- async def get_session(
299
- self,
300
- session_id: str,
301
- *,
302
- user_id: str,
303
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
304
- # The extra values given here take precedence over values defined on the client or passed to this method.
305
- extra_headers: Headers | None = None,
306
- extra_query: Query | None = None,
307
- extra_body: Body | None = None,
308
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
309
- ) -> None:
310
- """
311
- Args:
312
- extra_headers: Send extra headers
313
-
314
- extra_query: Add additional query parameters to the request
315
-
316
- extra_body: Add additional JSON properties to the request
317
-
318
- timeout: Override the client-level default timeout for this request, in seconds
319
- """
320
- if not session_id:
321
- raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
322
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
323
- return await self._get(
324
- f"/api/v1/chat/session/{session_id}",
325
- options=make_request_options(
326
- extra_headers=extra_headers,
327
- extra_query=extra_query,
328
- extra_body=extra_body,
329
- timeout=timeout,
330
- query=await async_maybe_transform({"user_id": user_id}, chat_get_session_params.ChatGetSessionParams),
331
- ),
332
- cast_to=NoneType,
333
- )
334
-
335
- async def send_followups(
336
- self,
337
- *,
338
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
339
- # The extra values given here take precedence over values defined on the client or passed to this method.
340
- extra_headers: Headers | None = None,
341
- extra_query: Query | None = None,
342
- extra_body: Body | None = None,
343
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
344
- ) -> None:
345
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
346
- return await self._post(
347
- "/api/v1/chat/followups",
348
- options=make_request_options(
349
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
350
- ),
351
- cast_to=NoneType,
352
- )
353
-
354
- async def send_message(
355
- self,
356
- *,
357
- component_id: str,
358
- message: chat_send_message_params.Message,
359
- x_component_id: str,
360
- context: object | NotGiven = NOT_GIVEN,
361
- group_ids: List[str] | NotGiven = NOT_GIVEN,
362
- session_id: str | NotGiven = NOT_GIVEN,
363
- user_id: str | NotGiven = NOT_GIVEN,
364
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
365
- # The extra values given here take precedence over values defined on the client or passed to this method.
366
- extra_headers: Headers | None = None,
367
- extra_query: Query | None = None,
368
- extra_body: Body | None = None,
369
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
370
- ) -> None:
371
- """
372
- Args:
373
- component_id: Component ID for context
374
-
375
- message: Chat message content
376
-
377
- context: Additional context data
378
-
379
- group_ids: Group IDs for collaboration
380
-
381
- session_id: Session ID for conversation continuity
382
-
383
- user_id: User ID for tracking
384
-
385
- extra_headers: Send extra headers
386
-
387
- extra_query: Add additional query parameters to the request
388
-
389
- extra_body: Add additional JSON properties to the request
390
-
391
- timeout: Override the client-level default timeout for this request, in seconds
392
- """
393
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
394
- extra_headers.update({"x-component-id": x_component_id})
395
- return await self._post(
396
- "/api/v1/chat/message",
397
- body=await async_maybe_transform(
398
- {
399
- "component_id": component_id,
400
- "message": message,
401
- "context": context,
402
- "group_ids": group_ids,
403
- "session_id": session_id,
404
- "user_id": user_id,
405
- },
406
- chat_send_message_params.ChatSendMessageParams,
407
- ),
408
- options=make_request_options(
409
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
410
- ),
411
- cast_to=NoneType,
412
- )
413
-
414
- async def stream(
415
- self,
416
- *,
417
- context: object | NotGiven = NOT_GIVEN,
418
- group_id: str | NotGiven = NOT_GIVEN,
419
- messages: Iterable[chat_stream_params.Message] | NotGiven = NOT_GIVEN,
420
- user_id: str | NotGiven = NOT_GIVEN,
421
- x_component_id: str | NotGiven = NOT_GIVEN,
422
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
423
- # The extra values given here take precedence over values defined on the client or passed to this method.
424
- extra_headers: Headers | None = None,
425
- extra_query: Query | None = None,
426
- extra_body: Body | None = None,
427
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
428
- ) -> None:
429
- """
430
- Stream chat responses
431
-
432
- Args:
433
- extra_headers: Send extra headers
434
-
435
- extra_query: Add additional query parameters to the request
436
-
437
- extra_body: Add additional JSON properties to the request
438
-
439
- timeout: Override the client-level default timeout for this request, in seconds
440
- """
441
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
442
- extra_headers = {**strip_not_given({"x-component-id": x_component_id}), **(extra_headers or {})}
443
- return await self._post(
444
- "/api/v1/chat/stream",
445
- body=await async_maybe_transform(
446
- {
447
- "context": context,
448
- "group_id": group_id,
449
- "messages": messages,
450
- "user_id": user_id,
451
- },
452
- chat_stream_params.ChatStreamParams,
453
- ),
454
- options=make_request_options(
455
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
456
- ),
457
- cast_to=NoneType,
458
- )
459
-
460
-
461
- class ChatResourceWithRawResponse:
462
- def __init__(self, chat: ChatResource) -> None:
463
- self._chat = chat
464
-
465
- self.get_history = to_raw_response_wrapper(
466
- chat.get_history,
467
- )
468
- self.get_session = to_raw_response_wrapper(
469
- chat.get_session,
470
- )
471
- self.send_followups = to_raw_response_wrapper(
472
- chat.send_followups,
473
- )
474
- self.send_message = to_raw_response_wrapper(
475
- chat.send_message,
476
- )
477
- self.stream = to_raw_response_wrapper(
478
- chat.stream,
479
- )
480
-
481
- @cached_property
482
- def sessions(self) -> SessionsResourceWithRawResponse:
483
- return SessionsResourceWithRawResponse(self._chat.sessions)
484
-
485
- @cached_property
486
- def test(self) -> TestResourceWithRawResponse:
487
- return TestResourceWithRawResponse(self._chat.test)
488
-
489
-
490
- class AsyncChatResourceWithRawResponse:
491
- def __init__(self, chat: AsyncChatResource) -> None:
492
- self._chat = chat
493
-
494
- self.get_history = async_to_raw_response_wrapper(
495
- chat.get_history,
496
- )
497
- self.get_session = async_to_raw_response_wrapper(
498
- chat.get_session,
499
- )
500
- self.send_followups = async_to_raw_response_wrapper(
501
- chat.send_followups,
502
- )
503
- self.send_message = async_to_raw_response_wrapper(
504
- chat.send_message,
505
- )
506
- self.stream = async_to_raw_response_wrapper(
507
- chat.stream,
508
- )
509
-
510
- @cached_property
511
- def sessions(self) -> AsyncSessionsResourceWithRawResponse:
512
- return AsyncSessionsResourceWithRawResponse(self._chat.sessions)
513
-
514
- @cached_property
515
- def test(self) -> AsyncTestResourceWithRawResponse:
516
- return AsyncTestResourceWithRawResponse(self._chat.test)
517
-
518
-
519
- class ChatResourceWithStreamingResponse:
520
- def __init__(self, chat: ChatResource) -> None:
521
- self._chat = chat
522
-
523
- self.get_history = to_streamed_response_wrapper(
524
- chat.get_history,
525
- )
526
- self.get_session = to_streamed_response_wrapper(
527
- chat.get_session,
528
- )
529
- self.send_followups = to_streamed_response_wrapper(
530
- chat.send_followups,
531
- )
532
- self.send_message = to_streamed_response_wrapper(
533
- chat.send_message,
534
- )
535
- self.stream = to_streamed_response_wrapper(
536
- chat.stream,
537
- )
538
-
539
- @cached_property
540
- def sessions(self) -> SessionsResourceWithStreamingResponse:
541
- return SessionsResourceWithStreamingResponse(self._chat.sessions)
542
-
543
- @cached_property
544
- def test(self) -> TestResourceWithStreamingResponse:
545
- return TestResourceWithStreamingResponse(self._chat.test)
546
-
547
-
548
- class AsyncChatResourceWithStreamingResponse:
549
- def __init__(self, chat: AsyncChatResource) -> None:
550
- self._chat = chat
551
-
552
- self.get_history = async_to_streamed_response_wrapper(
553
- chat.get_history,
554
- )
555
- self.get_session = async_to_streamed_response_wrapper(
556
- chat.get_session,
557
- )
558
- self.send_followups = async_to_streamed_response_wrapper(
559
- chat.send_followups,
560
- )
561
- self.send_message = async_to_streamed_response_wrapper(
562
- chat.send_message,
563
- )
564
- self.stream = async_to_streamed_response_wrapper(
565
- chat.stream,
566
- )
567
-
568
- @cached_property
569
- def sessions(self) -> AsyncSessionsResourceWithStreamingResponse:
570
- return AsyncSessionsResourceWithStreamingResponse(self._chat.sessions)
571
-
572
- @cached_property
573
- def test(self) -> AsyncTestResourceWithStreamingResponse:
574
- return AsyncTestResourceWithStreamingResponse(self._chat.test)