studyfetch-sdk 0.1.0a20__tar.gz → 0.1.0a21__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/.gitignore +0 -1
- studyfetch_sdk-0.1.0a21/.release-please-manifest.json +3 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/CHANGELOG.md +21 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/PKG-INFO +1 -1
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/api.md +9 -21
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/pyproject.toml +1 -1
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_version.py +1 -1
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/__init__.py +14 -14
- studyfetch_sdk-0.1.0a21/src/studyfetch_sdk/resources/v1/chat.py +246 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/materials/materials.py +304 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/materials/upload.py +6 -14
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/v1.py +32 -32
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/__init__.py +4 -0
- studyfetch_sdk-0.1.0a21/src/studyfetch_sdk/types/v1/chat_stream_params.py +60 -0
- studyfetch_sdk-0.1.0a21/src/studyfetch_sdk/types/v1/generated_material.py +65 -0
- studyfetch_sdk-0.1.0a21/src/studyfetch_sdk/types/v1/material_generate_and_process_params.py +38 -0
- studyfetch_sdk-0.1.0a21/src/studyfetch_sdk/types/v1/material_generate_params.py +32 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_complete_upload_params.py +2 -5
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +1 -1
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/materials/test_upload.py +12 -18
- studyfetch_sdk-0.1.0a21/tests/api_resources/v1/test_chat.py +130 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/test_materials.py +221 -0
- studyfetch_sdk-0.1.0a20/.release-please-manifest.json +0 -3
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/resources/v1/upload/__init__.py +0 -33
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/resources/v1/upload/component.py +0 -572
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/resources/v1/upload/upload.py +0 -102
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/__init__.py +0 -11
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/component_complete_upload_params.py +0 -20
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/component_complete_upload_response.py +0 -16
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/component_get_presigned_url_params.py +0 -23
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/component_get_presigned_url_response.py +0 -15
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/component_upload_file_params.py +0 -21
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/component_upload_url_params.py +0 -23
- studyfetch_sdk-0.1.0a20/src/studyfetch_sdk/types/v1/upload/file_upload_response.py +0 -24
- studyfetch_sdk-0.1.0a20/tests/api_resources/v1/upload/test_component.py +0 -476
- studyfetch_sdk-0.1.0a20/tests/api_resources/v1/usage/__init__.py +0 -1
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/CONTRIBUTING.md +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/LICENSE +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/README.md +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/SECURITY.md +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/bin/check-release-environment +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/bin/publish-pypi +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/examples/.keep +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/mypy.ini +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/noxfile.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/release-please-config.json +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/requirements-dev.lock +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/requirements.lock +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_base_client.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_client.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_compat.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_constants.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_exceptions.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_files.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_models.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_qs.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_resource.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_streaming.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_types.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_logs.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_proxy.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_reflection.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_resources_proxy.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_streams.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_sync.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_transform.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_typing.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/_utils/_utils.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/lib/.keep +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/py.typed +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/assignment_grader.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/components.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/embed/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/embed/component.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/embed/embed.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/folders.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/materials/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/materials/bulk.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/materials/test.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/usage/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/usage/analyst.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/usage/usage.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/assignment_grader_create_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/assignment_grader_get_all_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/assignment_grader_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component_create_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component_generate_embed_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component_generate_embed_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component_list_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component_list_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/component_update_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/content_param.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/embed/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/embed/component_interact_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/embed/component_retrieve_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/embed_get_theme_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/embed_verify_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/folder_create_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/folder_list_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/folder_update_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_batch_create_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_batch_create_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_create_and_process_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_create_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_debug_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_get_download_url_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_get_download_url_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_list_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_list_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_move_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_rename_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_search_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/material_search_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/bulk_move_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/bulk_move_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/test_perform_ocr_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/test_process_epub_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/test_process_image_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/test_process_video_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_create_presigned_url_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_upload_from_url_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage_get_stats_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage_get_summary_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/types/v1/usage_list_events_params.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/test_v1.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/embed/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/embed/test_component.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/materials/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/materials/test_bulk.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/materials/test_test.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/test_assignment_grader.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/test_components.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/test_embed.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/test_folders.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/test_usage.py +0 -0
- {studyfetch_sdk-0.1.0a20/tests/api_resources/v1/upload → studyfetch_sdk-0.1.0a21/tests/api_resources/v1/usage}/__init__.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/api_resources/v1/usage/test_analyst.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/conftest.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/sample_file.txt +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_client.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_deepcopy.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_extract_files.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_files.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_models.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_qs.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_required_args.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_response.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_streaming.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_transform.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_utils/test_proxy.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/test_utils/test_typing.py +0 -0
- {studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/tests/utils.py +0 -0
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.21 (2025-07-26)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([598ed4a](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/598ed4aa9870a220f567090c2c22a380b6e8a39d))
|
10
|
+
* **api:** api update ([1ca67b9](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/1ca67b9565830a352b95bb6509155db8b4abf2a7))
|
11
|
+
* **api:** api update ([edde35c](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/edde35c095d711d48332be135c7a6618350864df))
|
12
|
+
* **api:** api update ([4891c2c](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/4891c2ca88ad4f3886468c5fef0dd54626640bbd))
|
13
|
+
* **api:** api update ([f988365](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/f9883659a11e1b8c07bc7fc0ba66ee7dac060db4))
|
14
|
+
* **api:** manual updates ([ec6c3fd](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/ec6c3fd8421da42c5ba040640b65f705faa256e3))
|
15
|
+
* **api:** manual updates ([be7ba51](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/be7ba5130b9a741ad2344fbe28713d265a6b3300))
|
16
|
+
* **api:** manual updates ([429fb80](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/429fb8066d183997b7e7b4ac6fb604d4d179f974))
|
17
|
+
* **api:** manual updates ([c31d639](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/c31d6392cf5cb03569052af6c32338822b78d9ba))
|
18
|
+
|
19
|
+
|
20
|
+
### Chores
|
21
|
+
|
22
|
+
* **project:** add settings file for vscode ([5149c86](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/commit/5149c862af1e8fa4ecff6078c59e69b756346a8c))
|
23
|
+
|
3
24
|
## 0.1.0-alpha.20 (2025-07-24)
|
4
25
|
|
5
26
|
Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: studyfetch_sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a21
|
4
4
|
Summary: The official Python library for the studyfetch-sdk API
|
5
5
|
Project-URL: Homepage, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
|
6
6
|
Project-URL: Repository, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
|
@@ -11,6 +11,7 @@ Types:
|
|
11
11
|
```python
|
12
12
|
from studyfetch_sdk.types.v1 import (
|
13
13
|
Content,
|
14
|
+
GeneratedMaterial,
|
14
15
|
Material,
|
15
16
|
MaterialListResponse,
|
16
17
|
MaterialBatchCreateResponse,
|
@@ -29,6 +30,8 @@ Methods:
|
|
29
30
|
- <code title="post /api/v1/materials/batch">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">batch_create</a>(\*\*<a href="src/studyfetch_sdk/types/v1/material_batch_create_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/material_batch_create_response.py">MaterialBatchCreateResponse</a></code>
|
30
31
|
- <code title="post /api/v1/materials/upload-and-process">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">create_and_process</a>(\*\*<a href="src/studyfetch_sdk/types/v1/material_create_and_process_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/material.py">Material</a></code>
|
31
32
|
- <code title="get /api/v1/materials/{id}/debug">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">debug</a>(id) -> <a href="./src/studyfetch_sdk/types/v1/material_debug_response.py">MaterialDebugResponse</a></code>
|
33
|
+
- <code title="post /api/v1/materials/generate">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">generate</a>(\*\*<a href="src/studyfetch_sdk/types/v1/material_generate_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/generated_material.py">GeneratedMaterial</a></code>
|
34
|
+
- <code title="post /api/v1/materials/generate-and-process">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">generate_and_process</a>(\*\*<a href="src/studyfetch_sdk/types/v1/material_generate_and_process_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/generated_material.py">GeneratedMaterial</a></code>
|
32
35
|
- <code title="get /api/v1/materials/{id}/download-url">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">get_download_url</a>(id, \*\*<a href="src/studyfetch_sdk/types/v1/material_get_download_url_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/material_get_download_url_response.py">MaterialGetDownloadURLResponse</a></code>
|
33
36
|
- <code title="post /api/v1/materials/{id}/move">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">move</a>(id, \*\*<a href="src/studyfetch_sdk/types/v1/material_move_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/material.py">Material</a></code>
|
34
37
|
- <code title="post /api/v1/materials/{id}/rename">client.v1.materials.<a href="./src/studyfetch_sdk/resources/v1/materials/materials.py">rename</a>(id, \*\*<a href="src/studyfetch_sdk/types/v1/material_rename_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/material.py">Material</a></code>
|
@@ -154,27 +157,6 @@ Methods:
|
|
154
157
|
- <code title="get /api/v1/embed/component/{componentId}">client.v1.embed.component.<a href="./src/studyfetch_sdk/resources/v1/embed/component.py">retrieve</a>(component_id, \*\*<a href="src/studyfetch_sdk/types/v1/embed/component_retrieve_params.py">params</a>) -> None</code>
|
155
158
|
- <code title="post /api/v1/embed/component/{componentId}/interact">client.v1.embed.component.<a href="./src/studyfetch_sdk/resources/v1/embed/component.py">interact</a>(component_id, \*\*<a href="src/studyfetch_sdk/types/v1/embed/component_interact_params.py">params</a>) -> None</code>
|
156
159
|
|
157
|
-
## Upload
|
158
|
-
|
159
|
-
### Component
|
160
|
-
|
161
|
-
Types:
|
162
|
-
|
163
|
-
```python
|
164
|
-
from studyfetch_sdk.types.v1.upload import (
|
165
|
-
FileUploadResponse,
|
166
|
-
ComponentCompleteUploadResponse,
|
167
|
-
ComponentGetPresignedURLResponse,
|
168
|
-
)
|
169
|
-
```
|
170
|
-
|
171
|
-
Methods:
|
172
|
-
|
173
|
-
- <code title="post /api/v1/upload/component/{componentId}/complete">client.v1.upload.component.<a href="./src/studyfetch_sdk/resources/v1/upload/component.py">complete_upload</a>(component_id, \*\*<a href="src/studyfetch_sdk/types/v1/upload/component_complete_upload_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/upload/component_complete_upload_response.py">ComponentCompleteUploadResponse</a></code>
|
174
|
-
- <code title="post /api/v1/upload/component/{componentId}/presigned-url">client.v1.upload.component.<a href="./src/studyfetch_sdk/resources/v1/upload/component.py">get_presigned_url</a>(component_id, \*\*<a href="src/studyfetch_sdk/types/v1/upload/component_get_presigned_url_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/upload/component_get_presigned_url_response.py">ComponentGetPresignedURLResponse</a></code>
|
175
|
-
- <code title="post /api/v1/upload/component/{componentId}/file">client.v1.upload.component.<a href="./src/studyfetch_sdk/resources/v1/upload/component.py">upload_file</a>(component_id, \*\*<a href="src/studyfetch_sdk/types/v1/upload/component_upload_file_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/upload/file_upload_response.py">FileUploadResponse</a></code>
|
176
|
-
- <code title="post /api/v1/upload/component/{componentId}/url">client.v1.upload.component.<a href="./src/studyfetch_sdk/resources/v1/upload/component.py">upload_url</a>(component_id, \*\*<a href="src/studyfetch_sdk/types/v1/upload/component_upload_url_params.py">params</a>) -> <a href="./src/studyfetch_sdk/types/v1/upload/file_upload_response.py">FileUploadResponse</a></code>
|
177
|
-
|
178
160
|
## AssignmentGrader
|
179
161
|
|
180
162
|
Types:
|
@@ -189,3 +171,9 @@ Methods:
|
|
189
171
|
- <code title="delete /api/v1/assignment-grader/delete/{id}">client.v1.assignment_grader.<a href="./src/studyfetch_sdk/resources/v1/assignment_grader.py">delete</a>(id) -> None</code>
|
190
172
|
- <code title="get /api/v1/assignment-grader/get">client.v1.assignment_grader.<a href="./src/studyfetch_sdk/resources/v1/assignment_grader.py">get_all</a>() -> <a href="./src/studyfetch_sdk/types/v1/assignment_grader_get_all_response.py">AssignmentGraderGetAllResponse</a></code>
|
191
173
|
- <code title="get /api/v1/assignment-grader/get/{id}">client.v1.assignment_grader.<a href="./src/studyfetch_sdk/resources/v1/assignment_grader.py">get_by_id</a>(id) -> <a href="./src/studyfetch_sdk/types/v1/assignment_grader_response.py">AssignmentGraderResponse</a></code>
|
174
|
+
|
175
|
+
## Chat
|
176
|
+
|
177
|
+
Methods:
|
178
|
+
|
179
|
+
- <code title="post /api/v1/chat/stream">client.v1.chat.<a href="./src/studyfetch_sdk/resources/v1/chat.py">stream</a>(\*\*<a href="src/studyfetch_sdk/types/v1/chat_stream_params.py">params</a>) -> None</code>
|
{studyfetch_sdk-0.1.0a20 → studyfetch_sdk-0.1.0a21}/src/studyfetch_sdk/resources/v1/__init__.py
RENAMED
@@ -8,6 +8,14 @@ from .v1 import (
|
|
8
8
|
V1ResourceWithStreamingResponse,
|
9
9
|
AsyncV1ResourceWithStreamingResponse,
|
10
10
|
)
|
11
|
+
from .chat import (
|
12
|
+
ChatResource,
|
13
|
+
AsyncChatResource,
|
14
|
+
ChatResourceWithRawResponse,
|
15
|
+
AsyncChatResourceWithRawResponse,
|
16
|
+
ChatResourceWithStreamingResponse,
|
17
|
+
AsyncChatResourceWithStreamingResponse,
|
18
|
+
)
|
11
19
|
from .embed import (
|
12
20
|
EmbedResource,
|
13
21
|
AsyncEmbedResource,
|
@@ -24,14 +32,6 @@ from .usage import (
|
|
24
32
|
UsageResourceWithStreamingResponse,
|
25
33
|
AsyncUsageResourceWithStreamingResponse,
|
26
34
|
)
|
27
|
-
from .upload import (
|
28
|
-
UploadResource,
|
29
|
-
AsyncUploadResource,
|
30
|
-
UploadResourceWithRawResponse,
|
31
|
-
AsyncUploadResourceWithRawResponse,
|
32
|
-
UploadResourceWithStreamingResponse,
|
33
|
-
AsyncUploadResourceWithStreamingResponse,
|
34
|
-
)
|
35
35
|
from .folders import (
|
36
36
|
FoldersResource,
|
37
37
|
AsyncFoldersResource,
|
@@ -96,18 +96,18 @@ __all__ = [
|
|
96
96
|
"AsyncEmbedResourceWithRawResponse",
|
97
97
|
"EmbedResourceWithStreamingResponse",
|
98
98
|
"AsyncEmbedResourceWithStreamingResponse",
|
99
|
-
"UploadResource",
|
100
|
-
"AsyncUploadResource",
|
101
|
-
"UploadResourceWithRawResponse",
|
102
|
-
"AsyncUploadResourceWithRawResponse",
|
103
|
-
"UploadResourceWithStreamingResponse",
|
104
|
-
"AsyncUploadResourceWithStreamingResponse",
|
105
99
|
"AssignmentGraderResource",
|
106
100
|
"AsyncAssignmentGraderResource",
|
107
101
|
"AssignmentGraderResourceWithRawResponse",
|
108
102
|
"AsyncAssignmentGraderResourceWithRawResponse",
|
109
103
|
"AssignmentGraderResourceWithStreamingResponse",
|
110
104
|
"AsyncAssignmentGraderResourceWithStreamingResponse",
|
105
|
+
"ChatResource",
|
106
|
+
"AsyncChatResource",
|
107
|
+
"ChatResourceWithRawResponse",
|
108
|
+
"AsyncChatResourceWithRawResponse",
|
109
|
+
"ChatResourceWithStreamingResponse",
|
110
|
+
"AsyncChatResourceWithStreamingResponse",
|
111
111
|
"V1Resource",
|
112
112
|
"AsyncV1Resource",
|
113
113
|
"V1ResourceWithRawResponse",
|
@@ -0,0 +1,246 @@
|
|
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
|
6
|
+
|
7
|
+
import httpx
|
8
|
+
|
9
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
10
|
+
from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
|
11
|
+
from ..._compat import cached_property
|
12
|
+
from ...types.v1 import chat_stream_params
|
13
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
14
|
+
from ..._response import (
|
15
|
+
to_raw_response_wrapper,
|
16
|
+
to_streamed_response_wrapper,
|
17
|
+
async_to_raw_response_wrapper,
|
18
|
+
async_to_streamed_response_wrapper,
|
19
|
+
)
|
20
|
+
from ..._base_client import make_request_options
|
21
|
+
|
22
|
+
__all__ = ["ChatResource", "AsyncChatResource"]
|
23
|
+
|
24
|
+
|
25
|
+
class ChatResource(SyncAPIResource):
|
26
|
+
@cached_property
|
27
|
+
def with_raw_response(self) -> ChatResourceWithRawResponse:
|
28
|
+
"""
|
29
|
+
This property can be used as a prefix for any HTTP method call to return
|
30
|
+
the raw response object instead of the parsed content.
|
31
|
+
|
32
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
33
|
+
"""
|
34
|
+
return ChatResourceWithRawResponse(self)
|
35
|
+
|
36
|
+
@cached_property
|
37
|
+
def with_streaming_response(self) -> ChatResourceWithStreamingResponse:
|
38
|
+
"""
|
39
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
40
|
+
|
41
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
42
|
+
"""
|
43
|
+
return ChatResourceWithStreamingResponse(self)
|
44
|
+
|
45
|
+
def stream(
|
46
|
+
self,
|
47
|
+
*,
|
48
|
+
id: str | NotGiven = NOT_GIVEN,
|
49
|
+
component_id: str | NotGiven = NOT_GIVEN,
|
50
|
+
context: object | NotGiven = NOT_GIVEN,
|
51
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
52
|
+
message: chat_stream_params.Message | NotGiven = NOT_GIVEN,
|
53
|
+
messages: List[str] | NotGiven = NOT_GIVEN,
|
54
|
+
session_id: str | NotGiven = NOT_GIVEN,
|
55
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
56
|
+
x_component_id: str | NotGiven = NOT_GIVEN,
|
57
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
58
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
59
|
+
extra_headers: Headers | None = None,
|
60
|
+
extra_query: Query | None = None,
|
61
|
+
extra_body: Body | None = None,
|
62
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
63
|
+
) -> None:
|
64
|
+
"""Streams a chat response in real-time using server-sent events (SSE).
|
65
|
+
|
66
|
+
Supports
|
67
|
+
both AI SDK format (with messages array) and custom format (with message
|
68
|
+
object).
|
69
|
+
|
70
|
+
Args:
|
71
|
+
id: Session ID (AI SDK uses "id")
|
72
|
+
|
73
|
+
component_id: Component ID
|
74
|
+
|
75
|
+
context: Additional context
|
76
|
+
|
77
|
+
group_ids: Group IDs for access control
|
78
|
+
|
79
|
+
message: Single message for custom format - contains text and optional images
|
80
|
+
|
81
|
+
messages: Messages array for AI SDK format - list of conversation messages with roles
|
82
|
+
|
83
|
+
session_id: Session ID
|
84
|
+
|
85
|
+
user_id: User ID
|
86
|
+
|
87
|
+
extra_headers: Send extra headers
|
88
|
+
|
89
|
+
extra_query: Add additional query parameters to the request
|
90
|
+
|
91
|
+
extra_body: Add additional JSON properties to the request
|
92
|
+
|
93
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
94
|
+
"""
|
95
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
96
|
+
extra_headers = {**strip_not_given({"x-component-id": x_component_id}), **(extra_headers or {})}
|
97
|
+
return self._post(
|
98
|
+
"/api/v1/chat/stream",
|
99
|
+
body=maybe_transform(
|
100
|
+
{
|
101
|
+
"id": id,
|
102
|
+
"component_id": component_id,
|
103
|
+
"context": context,
|
104
|
+
"group_ids": group_ids,
|
105
|
+
"message": message,
|
106
|
+
"messages": messages,
|
107
|
+
"session_id": session_id,
|
108
|
+
"user_id": user_id,
|
109
|
+
},
|
110
|
+
chat_stream_params.ChatStreamParams,
|
111
|
+
),
|
112
|
+
options=make_request_options(
|
113
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
114
|
+
),
|
115
|
+
cast_to=NoneType,
|
116
|
+
)
|
117
|
+
|
118
|
+
|
119
|
+
class AsyncChatResource(AsyncAPIResource):
|
120
|
+
@cached_property
|
121
|
+
def with_raw_response(self) -> AsyncChatResourceWithRawResponse:
|
122
|
+
"""
|
123
|
+
This property can be used as a prefix for any HTTP method call to return
|
124
|
+
the raw response object instead of the parsed content.
|
125
|
+
|
126
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
127
|
+
"""
|
128
|
+
return AsyncChatResourceWithRawResponse(self)
|
129
|
+
|
130
|
+
@cached_property
|
131
|
+
def with_streaming_response(self) -> AsyncChatResourceWithStreamingResponse:
|
132
|
+
"""
|
133
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
134
|
+
|
135
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
136
|
+
"""
|
137
|
+
return AsyncChatResourceWithStreamingResponse(self)
|
138
|
+
|
139
|
+
async def stream(
|
140
|
+
self,
|
141
|
+
*,
|
142
|
+
id: str | NotGiven = NOT_GIVEN,
|
143
|
+
component_id: str | NotGiven = NOT_GIVEN,
|
144
|
+
context: object | NotGiven = NOT_GIVEN,
|
145
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
146
|
+
message: chat_stream_params.Message | NotGiven = NOT_GIVEN,
|
147
|
+
messages: List[str] | NotGiven = NOT_GIVEN,
|
148
|
+
session_id: str | NotGiven = NOT_GIVEN,
|
149
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
150
|
+
x_component_id: str | NotGiven = NOT_GIVEN,
|
151
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
152
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
153
|
+
extra_headers: Headers | None = None,
|
154
|
+
extra_query: Query | None = None,
|
155
|
+
extra_body: Body | None = None,
|
156
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
157
|
+
) -> None:
|
158
|
+
"""Streams a chat response in real-time using server-sent events (SSE).
|
159
|
+
|
160
|
+
Supports
|
161
|
+
both AI SDK format (with messages array) and custom format (with message
|
162
|
+
object).
|
163
|
+
|
164
|
+
Args:
|
165
|
+
id: Session ID (AI SDK uses "id")
|
166
|
+
|
167
|
+
component_id: Component ID
|
168
|
+
|
169
|
+
context: Additional context
|
170
|
+
|
171
|
+
group_ids: Group IDs for access control
|
172
|
+
|
173
|
+
message: Single message for custom format - contains text and optional images
|
174
|
+
|
175
|
+
messages: Messages array for AI SDK format - list of conversation messages with roles
|
176
|
+
|
177
|
+
session_id: Session ID
|
178
|
+
|
179
|
+
user_id: User ID
|
180
|
+
|
181
|
+
extra_headers: Send extra headers
|
182
|
+
|
183
|
+
extra_query: Add additional query parameters to the request
|
184
|
+
|
185
|
+
extra_body: Add additional JSON properties to the request
|
186
|
+
|
187
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
188
|
+
"""
|
189
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
190
|
+
extra_headers = {**strip_not_given({"x-component-id": x_component_id}), **(extra_headers or {})}
|
191
|
+
return await self._post(
|
192
|
+
"/api/v1/chat/stream",
|
193
|
+
body=await async_maybe_transform(
|
194
|
+
{
|
195
|
+
"id": id,
|
196
|
+
"component_id": component_id,
|
197
|
+
"context": context,
|
198
|
+
"group_ids": group_ids,
|
199
|
+
"message": message,
|
200
|
+
"messages": messages,
|
201
|
+
"session_id": session_id,
|
202
|
+
"user_id": user_id,
|
203
|
+
},
|
204
|
+
chat_stream_params.ChatStreamParams,
|
205
|
+
),
|
206
|
+
options=make_request_options(
|
207
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
208
|
+
),
|
209
|
+
cast_to=NoneType,
|
210
|
+
)
|
211
|
+
|
212
|
+
|
213
|
+
class ChatResourceWithRawResponse:
|
214
|
+
def __init__(self, chat: ChatResource) -> None:
|
215
|
+
self._chat = chat
|
216
|
+
|
217
|
+
self.stream = to_raw_response_wrapper(
|
218
|
+
chat.stream,
|
219
|
+
)
|
220
|
+
|
221
|
+
|
222
|
+
class AsyncChatResourceWithRawResponse:
|
223
|
+
def __init__(self, chat: AsyncChatResource) -> None:
|
224
|
+
self._chat = chat
|
225
|
+
|
226
|
+
self.stream = async_to_raw_response_wrapper(
|
227
|
+
chat.stream,
|
228
|
+
)
|
229
|
+
|
230
|
+
|
231
|
+
class ChatResourceWithStreamingResponse:
|
232
|
+
def __init__(self, chat: ChatResource) -> None:
|
233
|
+
self._chat = chat
|
234
|
+
|
235
|
+
self.stream = to_streamed_response_wrapper(
|
236
|
+
chat.stream,
|
237
|
+
)
|
238
|
+
|
239
|
+
|
240
|
+
class AsyncChatResourceWithStreamingResponse:
|
241
|
+
def __init__(self, chat: AsyncChatResource) -> None:
|
242
|
+
self._chat = chat
|
243
|
+
|
244
|
+
self.stream = async_to_streamed_response_wrapper(
|
245
|
+
chat.stream,
|
246
|
+
)
|