structifyai 1.158.0__py3-none-any.whl → 1.176.1__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.
- structify/_base_client.py +140 -11
- structify/_client.py +1116 -253
- structify/_models.py +16 -1
- structify/_streaming.py +12 -10
- structify/_types.py +12 -2
- structify/_version.py +1 -1
- structify/lib/__init__.py +5 -0
- structify/lib/cost_confirmation.py +63 -0
- structify/pagination.py +63 -1
- structify/resources/__init__.py +57 -27
- structify/resources/admin/__init__.py +26 -40
- structify/resources/admin/admin.py +39 -71
- structify/resources/admin/chat_templates.py +382 -0
- structify/resources/admin/jobs.py +76 -3
- structify/resources/admin/sandbox.py +184 -0
- structify/resources/admin/teams.py +88 -0
- structify/resources/admin/users.py +28 -238
- structify/resources/chat.py +232 -0
- structify/resources/connector_catalog/__init__.py +33 -0
- structify/resources/connector_catalog/admin.py +1510 -0
- structify/resources/connector_catalog/connector_catalog.py +394 -0
- structify/resources/connectors/__init__.py +33 -0
- structify/resources/{connectors.py → connectors/connectors.py} +1155 -325
- structify/resources/connectors/type_snippets.py +169 -0
- structify/resources/datasets/datasets.py +0 -4
- structify/resources/documents.py +1 -123
- structify/resources/external.py +35 -2
- structify/resources/jobs.py +19 -336
- structify/resources/nango.py +234 -0
- structify/resources/polars.py +225 -103
- structify/resources/sandbox.py +13 -110
- structify/resources/scrape.py +0 -16
- structify/resources/sessions.py +241 -153
- structify/resources/slack.py +1 -151
- structify/resources/structure.py +120 -48
- structify/resources/teams.py +96 -0
- structify/resources/user/__init__.py +14 -0
- structify/resources/user/api_keys.py +380 -0
- structify/resources/user/user.py +209 -2
- structify/resources/whitelabel.py +294 -187
- structify/resources/whitelabel_service.py +222 -0
- structify/resources/{report.py → wiki.py} +237 -210
- structify/resources/workflow_schedule.py +4 -5
- structify/types/__init__.py +67 -36
- structify/types/add_member_response.py +35 -4
- structify/types/admin/__init__.py +13 -88
- structify/types/admin/admin_dataset_return.py +6 -0
- structify/types/admin/{user_get_credits_response.py → admin_delete_jobs_response.py} +3 -3
- structify/types/admin/admin_list_jobs_response.py +35 -1
- structify/types/admin/admin_sandbox.py +38 -0
- structify/types/admin/chat_template_create_params.py +21 -0
- structify/types/admin/{human_llm_start_next_job_params.py → chat_template_list_params.py} +3 -3
- structify/types/admin/{human_llm_get_jobs_response.py → chat_template_list_response.py} +3 -3
- structify/types/admin/chat_template_update_params.py +22 -0
- structify/types/admin/{user_add_credits_response.py → expire_grants_response.py} +5 -3
- structify/types/admin/impersonate_response.py +17 -0
- structify/types/admin/{next_action_get_batched_training_data_params.py → job_delete_params.py} +2 -2
- structify/types/admin/{user_get_credits_params.py → sandbox_list_params.py} +4 -4
- structify/types/admin/sandbox_type.py +7 -0
- structify/types/admin/{user_set_credits_params.py → team_expire_grants_params.py} +4 -4
- structify/types/admin/user.py +16 -0
- structify/types/admin/user_create_params.py +1 -0
- structify/types/admin/{training_dataset_delete_params.py → user_impersonate_params.py} +3 -3
- structify/types/admin/user_list_response.py +14 -4
- structify/types/admin_grant_access_response.py +2 -0
- structify/types/{slack_user_mapping_response.py → admin_issue_found_response.py} +3 -5
- structify/types/chat_add_git_commit_response.py +2 -0
- structify/types/{admin/human_llm_get_next_step_params.py → chat_admin_issue_found_params.py} +4 -4
- structify/types/chat_create_session_params.py +7 -0
- structify/types/chat_dependency.py +17 -0
- structify/types/chat_event.py +51 -239
- structify/types/chat_get_git_commit_response.py +2 -0
- structify/types/chat_get_session_timeline_response.py +31 -1
- structify/types/{job_get_steps_response.py → chat_list_templates_response.py} +3 -3
- structify/types/chat_prompt.py +2 -0
- structify/types/chat_revert_to_commit_response.py +2 -0
- structify/types/chat_session.py +14 -0
- structify/types/chat_session_with_messages.py +33 -1
- structify/types/chat_template.py +31 -0
- structify/types/chat_update_session_params.py +2 -0
- structify/types/code_generate_code_params.py +7 -0
- structify/types/connector.py +16 -25
- structify/types/connector_auth_method.py +29 -0
- structify/types/connector_auth_method_with_fields.py +15 -0
- structify/types/connector_catalog/__init__.py +32 -0
- structify/types/connector_catalog/admin_batch_create_credential_fields_params.py +14 -0
- structify/types/connector_catalog/admin_batch_create_credential_fields_response.py +10 -0
- structify/types/connector_catalog/admin_batch_create_scopes_params.py +14 -0
- structify/types/connector_catalog/admin_create_auth_method_params.py +22 -0
- structify/types/connector_catalog/admin_create_catalog_params.py +22 -0
- structify/types/connector_catalog/admin_create_credential_field_params.py +28 -0
- structify/types/connector_catalog/admin_create_scope_params.py +19 -0
- structify/types/connector_catalog/admin_list_nango_pending_response.py +10 -0
- structify/types/{admin/training_dataset_get_datum_info_params.py → connector_catalog/admin_list_scopes_params.py} +3 -3
- structify/types/connector_catalog/admin_update_auth_method_params.py +16 -0
- structify/types/connector_catalog/admin_update_catalog_params.py +20 -0
- structify/types/connector_catalog/admin_update_credential_field_params.py +26 -0
- structify/types/connector_catalog/admin_update_scope_params.py +18 -0
- structify/types/connector_catalog/admin_upload_logo_params.py +13 -0
- structify/types/connector_catalog/batch_create_scopes_response.py +12 -0
- structify/types/connector_catalog/connector_auth_method_scope.py +25 -0
- structify/types/connector_catalog/connector_catalog.py +26 -0
- structify/types/connector_catalog/create_credential_field_request_param.py +28 -0
- structify/types/connector_catalog/create_scope_request_param.py +19 -0
- structify/types/connector_catalog/list_scopes_response.py +12 -0
- structify/types/connector_catalog/pending_nango_integration.py +17 -0
- structify/types/{admin/user_set_credits_response.py → connector_catalog/upload_logo_response.py} +3 -3
- structify/types/connector_catalog_list_params.py +20 -0
- structify/types/connector_catalog_list_response.py +22 -0
- structify/types/connector_catalog_with_methods.py +15 -0
- structify/types/connector_category.py +7 -0
- structify/types/connector_create_params.py +11 -25
- structify/types/connector_credential_field.py +34 -0
- structify/types/connector_delete_schema_object_params.py +35 -0
- structify/types/connector_explore_params.py +19 -0
- structify/types/connector_explorer_chat.py +9 -84
- structify/types/connector_get_clarification_requests_response.py +36 -0
- structify/types/connector_get_response.py +2 -0
- structify/types/connector_list_with_snippets_params.py +12 -0
- structify/types/connector_list_with_snippets_response.py +10 -0
- structify/types/connector_search_tables_params.py +15 -0
- structify/types/connector_search_tables_response.py +160 -0
- structify/types/connector_store_response.py +21 -0
- structify/types/connector_summaries_params.py +15 -0
- structify/types/connector_summaries_response.py +10 -0
- structify/types/connector_summary.py +16 -0
- structify/types/connector_table_info.py +15 -0
- structify/types/connector_update_column_params.py +12 -0
- structify/types/connector_update_params.py +4 -25
- structify/types/connector_update_table_params.py +14 -0
- structify/types/connector_with_secrets.py +2 -0
- structify/types/connector_with_snippets.py +11 -0
- structify/types/connectors/__init__.py +6 -0
- structify/types/connectors/snippet.py +20 -0
- structify/types/connectors/type_snippet_upsert_params.py +12 -0
- structify/types/create_chat_session_response.py +2 -0
- structify/types/dataset_create_params.py +0 -2
- structify/types/dataset_descriptor.py +6 -0
- structify/types/dataset_descriptor_param.py +6 -0
- structify/types/dataset_get_response.py +6 -0
- structify/types/dataset_list_response.py +6 -0
- structify/types/dataset_view_table_response.py +3 -1
- structify/types/delete_chat_session_response.py +2 -0
- structify/types/delete_schema_object_request_param.py +35 -0
- structify/types/delete_schema_object_response.py +13 -0
- structify/types/edge_spec_param.py +13 -0
- structify/types/entity_get_source_entities_response.py +0 -2
- structify/types/entity_list_jobs_response.py +3 -3
- structify/types/entity_view_response.py +0 -2
- structify/types/estimate_cost_response.py +9 -0
- structify/types/exploration_phase_id.py +79 -0
- structify/types/finalize_dag_response.py +11 -0
- structify/types/get_chat_session_response.py +14 -6
- structify/types/get_dependencies_response.py +15 -0
- structify/types/get_job_events_response.py +20 -0
- structify/types/get_node_response.py +10 -0
- structify/types/job_cancel_response.py +3 -3
- structify/types/job_event_body.py +108 -1
- structify/types/job_get_source_entities_response.py +0 -2
- structify/types/job_list_params.py +1 -1
- structify/types/job_list_response.py +35 -1
- structify/types/knowledge_graph.py +6 -0
- structify/types/knowledge_graph_param.py +6 -0
- structify/types/list_chat_sessions_response.py +2 -0
- structify/types/list_collaborators_response.py +4 -0
- structify/types/list_tables_response.py +12 -0
- structify/types/llm_information_store.py +62 -28
- structify/types/merge_config.py +2 -0
- structify/types/merge_config_param.py +2 -0
- structify/types/message.py +2 -0
- structify/types/nango_create_session_params.py +21 -0
- structify/types/nango_create_session_response.py +15 -0
- structify/types/nango_list_integrations_response.py +28 -0
- structify/types/{session_create_node_params.py → node_spec_param.py} +4 -4
- structify/types/refresh_session_response.py +15 -0
- structify/types/sandbox.py +8 -2
- structify/types/sandbox_get_params.py +2 -1
- structify/types/scrape_list_params.py +1 -22
- structify/types/scrape_list_response.py +2 -0
- structify/types/scrape_scrape_params.py +1 -14
- structify/types/scrape_scrape_response.py +2 -0
- structify/types/select_team_response.py +3 -1
- structify/types/{connector_approve_version_params.py → session_confirm_node_params.py} +3 -3
- structify/types/session_finalize_dag_params.py +20 -0
- structify/types/session_get_events_response.py +2 -0
- structify/types/session_request_confirmation_params.py +13 -0
- structify/types/session_upload_node_output_data_params.py +3 -0
- structify/types/slack_event_payload_param.py +18 -2
- structify/types/slack_events_params.py +18 -2
- structify/types/source_list_response.py +0 -2
- structify/types/structure_enhance_property_params.py +2 -17
- structify/types/structure_enhance_relationship_params.py +2 -17
- structify/types/structure_find_relationship_params.py +2 -18
- structify/types/structure_pdf_params.py +22 -0
- structify/types/structure_pdf_response.py +11 -0
- structify/types/structure_run_async_params.py +10 -17
- structify/types/table.py +2 -0
- structify/types/table_param.py +2 -0
- structify/types/team.py +14 -0
- structify/types/{admin/training_dataset_remove_datum_params.py → team_create_link_code_params.py} +3 -3
- structify/types/team_update_params.py +10 -0
- structify/types/team_wiki_page.py +28 -0
- structify/types/teams_link_code_response.py +13 -0
- structify/types/token_response.py +6 -2
- structify/types/tool_invocation.py +468 -0
- structify/types/tool_result.py +99 -0
- structify/types/update_table_response.py +46 -0
- structify/types/usage_group_key.py +14 -1
- structify/types/user/__init__.py +4 -0
- structify/types/{admin/training_dataset_size_params.py → user/api_key_create_params.py} +5 -5
- structify/types/user/api_key_info.py +24 -0
- structify/types/user/create_api_key_response.py +12 -0
- structify/types/user/list_api_keys_response.py +12 -0
- structify/types/user_enrich_params.py +11 -0
- structify/types/user_info.py +22 -0
- structify/types/user_refresh_params.py +13 -0
- structify/types/user_transactions_response.py +5 -5
- structify/types/user_update_params.py +32 -12
- structify/types/user_usage_response.py +0 -2
- structify/types/wiki_connector_reference.py +63 -0
- structify/types/wiki_create_params.py +16 -0
- structify/types/{admin/training_dataset_list_response.py → wiki_list_response.py} +4 -2
- structify/types/wiki_page_with_references.py +12 -0
- structify/types/wiki_update_params.py +16 -0
- structify/types/workflow_dag.py +2 -0
- structify/types/workflow_node_execution_status.py +3 -1
- structify/types/workflow_schedule_info.py +2 -2
- structify/types/workflow_session_node.py +10 -0
- {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/METADATA +67 -4
- structifyai-1.176.1.dist-info/RECORD +496 -0
- {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/licenses/LICENSE +1 -1
- structify/resources/admin/human_llm.py +0 -819
- structify/resources/admin/next_action.py +0 -656
- structify/resources/admin/training_datasets.py +0 -2028
- structify/resources/external/__init__.py +0 -61
- structify/resources/external/external.py +0 -166
- structify/resources/external/news.py +0 -519
- structify/resources/external/people.py +0 -998
- structify/resources/external/search_api.py +0 -1525
- structify/types/active_version_data.py +0 -21
- structify/types/active_version_response.py +0 -13
- structify/types/admin/action_training_data_entry.py +0 -219
- structify/types/admin/action_training_data_response.py +0 -12
- structify/types/admin/datum_status.py +0 -19
- structify/types/admin/delete_action_training_data_response.py +0 -9
- structify/types/admin/human_llm_add_search_for_job_params.py +0 -13
- structify/types/admin/human_llm_add_to_dataset_params.py +0 -186
- structify/types/admin/human_llm_finish_job_params.py +0 -13
- structify/types/admin/human_llm_get_jobs_params.py +0 -12
- structify/types/admin/human_llm_get_next_step_response.py +0 -196
- structify/types/admin/human_llm_job.py +0 -73
- structify/types/admin/human_llm_prelabel_step_response.py +0 -184
- structify/types/admin/human_llm_update_step_params.py +0 -186
- structify/types/admin/labeling_stats.py +0 -24
- structify/types/admin/next_action_add_training_datum_params.py +0 -203
- structify/types/admin/next_action_delete_training_data_params.py +0 -12
- structify/types/admin/next_action_get_training_data_params.py +0 -25
- structify/types/admin/next_action_get_training_datum_params.py +0 -12
- structify/types/admin/next_action_label_training_datum_params.py +0 -90
- structify/types/admin/step_choices.py +0 -32
- structify/types/admin/training_dataset_add_datum_params.py +0 -13
- structify/types/admin/training_dataset_add_params.py +0 -12
- structify/types/admin/training_dataset_download_datum_params.py +0 -13
- structify/types/admin/training_dataset_get_labeller_stats_params.py +0 -23
- structify/types/admin/training_dataset_get_labeller_stats_response.py +0 -10
- structify/types/admin/training_dataset_get_next_for_labeling_params.py +0 -15
- structify/types/admin/training_dataset_get_next_for_qa_params.py +0 -18
- structify/types/admin/training_dataset_get_next_suspicious_params.py +0 -23
- structify/types/admin/training_dataset_label_datum_params.py +0 -188
- structify/types/admin/training_dataset_list_datums_params.py +0 -17
- structify/types/admin/training_dataset_list_datums_response.py +0 -33
- structify/types/admin/training_dataset_mark_datum_suspicious_params.py +0 -19
- structify/types/admin/training_dataset_size_response.py +0 -37
- structify/types/admin/training_dataset_suspicious_count_params.py +0 -23
- structify/types/admin/training_dataset_suspicious_count_response.py +0 -9
- structify/types/admin/training_dataset_switch_dataset_params.py +0 -13
- structify/types/admin/training_dataset_update_datum_status_params.py +0 -18
- structify/types/admin/training_dataset_upload_labeled_step_params.py +0 -15
- structify/types/admin/training_dataset_verify_datum_params.py +0 -17
- structify/types/admin/training_datum_response.py +0 -405
- structify/types/admin/user_add_credits_params.py +0 -18
- structify/types/chat_prompt_param.py +0 -255
- structify/types/connector_column_descriptor.py +0 -21
- structify/types/connector_relational_database_descriptor.py +0 -13
- structify/types/connector_table_descriptor.py +0 -22
- structify/types/document_structure_params.py +0 -21
- structify/types/document_structure_response.py +0 -8
- structify/types/execution_step.py +0 -198
- structify/types/external/__init__.py +0 -96
- structify/types/external/companies_search_response.py +0 -28
- structify/types/external/company_search_result.py +0 -69
- structify/types/external/enriched_organization.py +0 -69
- structify/types/external/everything_response.py +0 -19
- structify/types/external/google_maps_result.py +0 -38
- structify/types/external/google_search_response.py +0 -19
- structify/types/external/google_search_result.py +0 -21
- structify/types/external/job_posting.py +0 -54
- structify/types/external/job_postings_response.py +0 -19
- structify/types/external/location_coordinates.py +0 -13
- structify/types/external/location_response.py +0 -16
- structify/types/external/location_result.py +0 -24
- structify/types/external/news_article.py +0 -33
- structify/types/external/news_everything_params.py +0 -45
- structify/types/external/news_source.py +0 -15
- structify/types/external/news_source_detail.py +0 -28
- structify/types/external/news_sources_params.py +0 -19
- structify/types/external/news_top_headlines_params.py +0 -28
- structify/types/external/organization_detail.py +0 -87
- structify/types/external/people_match_response.py +0 -18
- structify/types/external/people_search_response.py +0 -28
- structify/types/external/person_companies_search_params.py +0 -63
- structify/types/external/person_match.py +0 -60
- structify/types/external/person_organization_job_postings_params.py +0 -16
- structify/types/external/person_organizations_enrich_params.py +0 -16
- structify/types/external/person_people_match_params.py +0 -49
- structify/types/external/person_people_search_params.py +0 -57
- structify/types/external/person_search_result.py +0 -48
- structify/types/external/search_api_google_flights_calendar_params.py +0 -28
- structify/types/external/search_api_google_flights_calendar_response.py +0 -8
- structify/types/external/search_api_google_flights_location_search_params.py +0 -16
- structify/types/external/search_api_google_flights_location_search_response.py +0 -8
- structify/types/external/search_api_google_flights_search_params.py +0 -43
- structify/types/external/search_api_google_flights_search_response.py +0 -8
- structify/types/external/search_api_google_maps_place_details_params.py +0 -16
- structify/types/external/search_api_google_maps_place_details_response.py +0 -8
- structify/types/external/search_api_google_maps_place_photos_params.py +0 -16
- structify/types/external/search_api_google_maps_place_photos_response.py +0 -8
- structify/types/external/search_api_google_maps_place_reviews_params.py +0 -19
- structify/types/external/search_api_google_maps_place_reviews_response.py +0 -8
- structify/types/external/search_api_google_maps_search_params.py +0 -22
- structify/types/external/search_api_google_maps_search_response.py +0 -10
- structify/types/external/search_api_google_scholar_author_search_params.py +0 -22
- structify/types/external/search_api_google_scholar_author_search_response.py +0 -8
- structify/types/external/search_api_google_scholar_citations_params.py +0 -22
- structify/types/external/search_api_google_scholar_citations_response.py +0 -8
- structify/types/external/search_api_google_scholar_search_params.py +0 -28
- structify/types/external/search_api_google_scholar_search_response.py +0 -8
- structify/types/external/search_api_google_search_params.py +0 -25
- structify/types/external/search_api_location_search_params.py +0 -22
- structify/types/external/sources_response.py +0 -16
- structify/types/external/top_headlines_response.py +0 -19
- structify/types/job_delete_response.py +0 -7
- structify/types/job_get_response.py +0 -62
- structify/types/job_get_step_graph_response.py +0 -233
- structify/types/job_get_step_response.py +0 -196
- structify/types/message_param.py +0 -35
- structify/types/pending_version_response.py +0 -21
- structify/types/report_missing_params.py +0 -18
- structify/types/report_missing_response.py +0 -7
- structify/types/report_relationship_params.py +0 -18
- structify/types/report_relationship_response.py +0 -7
- structify/types/report_step_params.py +0 -15
- structify/types/report_step_response.py +0 -7
- structify/types/report_wrong_params.py +0 -18
- structify/types/report_wrong_response.py +0 -7
- structify/types/sandbox_create_params.py +0 -20
- structify/types/session_create_edge_params.py +0 -13
- structify/types/slack_connection_status.py +0 -15
- structify/types/slack_user_mapping_params.py +0 -18
- structify/types/tool_metadata_param.py +0 -17
- structify/types/user_team.py +0 -35
- structify/types/workflow_schedule_get_response.py +0 -10
- structifyai-1.158.0.dist-info/RECORD +0 -530
- {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/WHEEL +0 -0
|
@@ -34,23 +34,23 @@ from .dataset import (
|
|
|
34
34
|
DatasetResourceWithStreamingResponse,
|
|
35
35
|
AsyncDatasetResourceWithStreamingResponse,
|
|
36
36
|
)
|
|
37
|
-
from
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
AsyncHumanLlmResourceWithStreamingResponse,
|
|
37
|
+
from .sandbox import (
|
|
38
|
+
SandboxResource,
|
|
39
|
+
AsyncSandboxResource,
|
|
40
|
+
SandboxResourceWithRawResponse,
|
|
41
|
+
AsyncSandboxResourceWithRawResponse,
|
|
42
|
+
SandboxResourceWithStreamingResponse,
|
|
43
|
+
AsyncSandboxResourceWithStreamingResponse,
|
|
45
44
|
)
|
|
45
|
+
from ..._compat import cached_property
|
|
46
46
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
47
|
-
from .
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
from .chat_templates import (
|
|
48
|
+
ChatTemplatesResource,
|
|
49
|
+
AsyncChatTemplatesResource,
|
|
50
|
+
ChatTemplatesResourceWithRawResponse,
|
|
51
|
+
AsyncChatTemplatesResourceWithRawResponse,
|
|
52
|
+
ChatTemplatesResourceWithStreamingResponse,
|
|
53
|
+
AsyncChatTemplatesResourceWithStreamingResponse,
|
|
54
54
|
)
|
|
55
55
|
from .functional_tests import (
|
|
56
56
|
FunctionalTestsResource,
|
|
@@ -60,14 +60,6 @@ from .functional_tests import (
|
|
|
60
60
|
FunctionalTestsResourceWithStreamingResponse,
|
|
61
61
|
AsyncFunctionalTestsResourceWithStreamingResponse,
|
|
62
62
|
)
|
|
63
|
-
from .training_datasets import (
|
|
64
|
-
TrainingDatasetsResource,
|
|
65
|
-
AsyncTrainingDatasetsResource,
|
|
66
|
-
TrainingDatasetsResourceWithRawResponse,
|
|
67
|
-
AsyncTrainingDatasetsResourceWithRawResponse,
|
|
68
|
-
TrainingDatasetsResourceWithStreamingResponse,
|
|
69
|
-
AsyncTrainingDatasetsResourceWithStreamingResponse,
|
|
70
|
-
)
|
|
71
63
|
|
|
72
64
|
__all__ = ["AdminResource", "AsyncAdminResource"]
|
|
73
65
|
|
|
@@ -86,24 +78,20 @@ class AdminResource(SyncAPIResource):
|
|
|
86
78
|
return JobsResource(self._client)
|
|
87
79
|
|
|
88
80
|
@cached_property
|
|
89
|
-
def
|
|
90
|
-
return
|
|
81
|
+
def sandbox(self) -> SandboxResource:
|
|
82
|
+
return SandboxResource(self._client)
|
|
91
83
|
|
|
92
84
|
@cached_property
|
|
93
85
|
def functional_tests(self) -> FunctionalTestsResource:
|
|
94
86
|
return FunctionalTestsResource(self._client)
|
|
95
87
|
|
|
96
|
-
@cached_property
|
|
97
|
-
def next_action(self) -> NextActionResource:
|
|
98
|
-
return NextActionResource(self._client)
|
|
99
|
-
|
|
100
88
|
@cached_property
|
|
101
89
|
def users(self) -> UsersResource:
|
|
102
90
|
return UsersResource(self._client)
|
|
103
91
|
|
|
104
92
|
@cached_property
|
|
105
|
-
def
|
|
106
|
-
return
|
|
93
|
+
def chat_templates(self) -> ChatTemplatesResource:
|
|
94
|
+
return ChatTemplatesResource(self._client)
|
|
107
95
|
|
|
108
96
|
@cached_property
|
|
109
97
|
def with_raw_response(self) -> AdminResourceWithRawResponse:
|
|
@@ -139,24 +127,20 @@ class AsyncAdminResource(AsyncAPIResource):
|
|
|
139
127
|
return AsyncJobsResource(self._client)
|
|
140
128
|
|
|
141
129
|
@cached_property
|
|
142
|
-
def
|
|
143
|
-
return
|
|
130
|
+
def sandbox(self) -> AsyncSandboxResource:
|
|
131
|
+
return AsyncSandboxResource(self._client)
|
|
144
132
|
|
|
145
133
|
@cached_property
|
|
146
134
|
def functional_tests(self) -> AsyncFunctionalTestsResource:
|
|
147
135
|
return AsyncFunctionalTestsResource(self._client)
|
|
148
136
|
|
|
149
|
-
@cached_property
|
|
150
|
-
def next_action(self) -> AsyncNextActionResource:
|
|
151
|
-
return AsyncNextActionResource(self._client)
|
|
152
|
-
|
|
153
137
|
@cached_property
|
|
154
138
|
def users(self) -> AsyncUsersResource:
|
|
155
139
|
return AsyncUsersResource(self._client)
|
|
156
140
|
|
|
157
141
|
@cached_property
|
|
158
|
-
def
|
|
159
|
-
return
|
|
142
|
+
def chat_templates(self) -> AsyncChatTemplatesResource:
|
|
143
|
+
return AsyncChatTemplatesResource(self._client)
|
|
160
144
|
|
|
161
145
|
@cached_property
|
|
162
146
|
def with_raw_response(self) -> AsyncAdminResourceWithRawResponse:
|
|
@@ -195,24 +179,20 @@ class AdminResourceWithRawResponse:
|
|
|
195
179
|
return JobsResourceWithRawResponse(self._admin.jobs)
|
|
196
180
|
|
|
197
181
|
@cached_property
|
|
198
|
-
def
|
|
199
|
-
return
|
|
182
|
+
def sandbox(self) -> SandboxResourceWithRawResponse:
|
|
183
|
+
return SandboxResourceWithRawResponse(self._admin.sandbox)
|
|
200
184
|
|
|
201
185
|
@cached_property
|
|
202
186
|
def functional_tests(self) -> FunctionalTestsResourceWithRawResponse:
|
|
203
187
|
return FunctionalTestsResourceWithRawResponse(self._admin.functional_tests)
|
|
204
188
|
|
|
205
|
-
@cached_property
|
|
206
|
-
def next_action(self) -> NextActionResourceWithRawResponse:
|
|
207
|
-
return NextActionResourceWithRawResponse(self._admin.next_action)
|
|
208
|
-
|
|
209
189
|
@cached_property
|
|
210
190
|
def users(self) -> UsersResourceWithRawResponse:
|
|
211
191
|
return UsersResourceWithRawResponse(self._admin.users)
|
|
212
192
|
|
|
213
193
|
@cached_property
|
|
214
|
-
def
|
|
215
|
-
return
|
|
194
|
+
def chat_templates(self) -> ChatTemplatesResourceWithRawResponse:
|
|
195
|
+
return ChatTemplatesResourceWithRawResponse(self._admin.chat_templates)
|
|
216
196
|
|
|
217
197
|
|
|
218
198
|
class AsyncAdminResourceWithRawResponse:
|
|
@@ -232,24 +212,20 @@ class AsyncAdminResourceWithRawResponse:
|
|
|
232
212
|
return AsyncJobsResourceWithRawResponse(self._admin.jobs)
|
|
233
213
|
|
|
234
214
|
@cached_property
|
|
235
|
-
def
|
|
236
|
-
return
|
|
215
|
+
def sandbox(self) -> AsyncSandboxResourceWithRawResponse:
|
|
216
|
+
return AsyncSandboxResourceWithRawResponse(self._admin.sandbox)
|
|
237
217
|
|
|
238
218
|
@cached_property
|
|
239
219
|
def functional_tests(self) -> AsyncFunctionalTestsResourceWithRawResponse:
|
|
240
220
|
return AsyncFunctionalTestsResourceWithRawResponse(self._admin.functional_tests)
|
|
241
221
|
|
|
242
|
-
@cached_property
|
|
243
|
-
def next_action(self) -> AsyncNextActionResourceWithRawResponse:
|
|
244
|
-
return AsyncNextActionResourceWithRawResponse(self._admin.next_action)
|
|
245
|
-
|
|
246
222
|
@cached_property
|
|
247
223
|
def users(self) -> AsyncUsersResourceWithRawResponse:
|
|
248
224
|
return AsyncUsersResourceWithRawResponse(self._admin.users)
|
|
249
225
|
|
|
250
226
|
@cached_property
|
|
251
|
-
def
|
|
252
|
-
return
|
|
227
|
+
def chat_templates(self) -> AsyncChatTemplatesResourceWithRawResponse:
|
|
228
|
+
return AsyncChatTemplatesResourceWithRawResponse(self._admin.chat_templates)
|
|
253
229
|
|
|
254
230
|
|
|
255
231
|
class AdminResourceWithStreamingResponse:
|
|
@@ -269,24 +245,20 @@ class AdminResourceWithStreamingResponse:
|
|
|
269
245
|
return JobsResourceWithStreamingResponse(self._admin.jobs)
|
|
270
246
|
|
|
271
247
|
@cached_property
|
|
272
|
-
def
|
|
273
|
-
return
|
|
248
|
+
def sandbox(self) -> SandboxResourceWithStreamingResponse:
|
|
249
|
+
return SandboxResourceWithStreamingResponse(self._admin.sandbox)
|
|
274
250
|
|
|
275
251
|
@cached_property
|
|
276
252
|
def functional_tests(self) -> FunctionalTestsResourceWithStreamingResponse:
|
|
277
253
|
return FunctionalTestsResourceWithStreamingResponse(self._admin.functional_tests)
|
|
278
254
|
|
|
279
|
-
@cached_property
|
|
280
|
-
def next_action(self) -> NextActionResourceWithStreamingResponse:
|
|
281
|
-
return NextActionResourceWithStreamingResponse(self._admin.next_action)
|
|
282
|
-
|
|
283
255
|
@cached_property
|
|
284
256
|
def users(self) -> UsersResourceWithStreamingResponse:
|
|
285
257
|
return UsersResourceWithStreamingResponse(self._admin.users)
|
|
286
258
|
|
|
287
259
|
@cached_property
|
|
288
|
-
def
|
|
289
|
-
return
|
|
260
|
+
def chat_templates(self) -> ChatTemplatesResourceWithStreamingResponse:
|
|
261
|
+
return ChatTemplatesResourceWithStreamingResponse(self._admin.chat_templates)
|
|
290
262
|
|
|
291
263
|
|
|
292
264
|
class AsyncAdminResourceWithStreamingResponse:
|
|
@@ -306,21 +278,17 @@ class AsyncAdminResourceWithStreamingResponse:
|
|
|
306
278
|
return AsyncJobsResourceWithStreamingResponse(self._admin.jobs)
|
|
307
279
|
|
|
308
280
|
@cached_property
|
|
309
|
-
def
|
|
310
|
-
return
|
|
281
|
+
def sandbox(self) -> AsyncSandboxResourceWithStreamingResponse:
|
|
282
|
+
return AsyncSandboxResourceWithStreamingResponse(self._admin.sandbox)
|
|
311
283
|
|
|
312
284
|
@cached_property
|
|
313
285
|
def functional_tests(self) -> AsyncFunctionalTestsResourceWithStreamingResponse:
|
|
314
286
|
return AsyncFunctionalTestsResourceWithStreamingResponse(self._admin.functional_tests)
|
|
315
287
|
|
|
316
|
-
@cached_property
|
|
317
|
-
def next_action(self) -> AsyncNextActionResourceWithStreamingResponse:
|
|
318
|
-
return AsyncNextActionResourceWithStreamingResponse(self._admin.next_action)
|
|
319
|
-
|
|
320
288
|
@cached_property
|
|
321
289
|
def users(self) -> AsyncUsersResourceWithStreamingResponse:
|
|
322
290
|
return AsyncUsersResourceWithStreamingResponse(self._admin.users)
|
|
323
291
|
|
|
324
292
|
@cached_property
|
|
325
|
-
def
|
|
326
|
-
return
|
|
293
|
+
def chat_templates(self) -> AsyncChatTemplatesResourceWithStreamingResponse:
|
|
294
|
+
return AsyncChatTemplatesResourceWithStreamingResponse(self._admin.chat_templates)
|
|
@@ -0,0 +1,382 @@
|
|
|
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 Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ..._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...types.admin import chat_template_list_params, chat_template_create_params, chat_template_update_params
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.chat_template import ChatTemplate
|
|
22
|
+
from ...types.admin.chat_template_list_response import ChatTemplateListResponse
|
|
23
|
+
|
|
24
|
+
__all__ = ["ChatTemplatesResource", "AsyncChatTemplatesResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ChatTemplatesResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> ChatTemplatesResourceWithRawResponse:
|
|
30
|
+
"""
|
|
31
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
32
|
+
the raw response object instead of the parsed content.
|
|
33
|
+
|
|
34
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return ChatTemplatesResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> ChatTemplatesResourceWithStreamingResponse:
|
|
40
|
+
"""
|
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return ChatTemplatesResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def create(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
chat_session_id: str,
|
|
51
|
+
description: str,
|
|
52
|
+
display_order: int,
|
|
53
|
+
image_url: str,
|
|
54
|
+
is_active: bool,
|
|
55
|
+
title: str,
|
|
56
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
57
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
58
|
+
extra_headers: Headers | None = None,
|
|
59
|
+
extra_query: Query | None = None,
|
|
60
|
+
extra_body: Body | None = None,
|
|
61
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
62
|
+
) -> ChatTemplate:
|
|
63
|
+
"""
|
|
64
|
+
Args:
|
|
65
|
+
extra_headers: Send extra headers
|
|
66
|
+
|
|
67
|
+
extra_query: Add additional query parameters to the request
|
|
68
|
+
|
|
69
|
+
extra_body: Add additional JSON properties to the request
|
|
70
|
+
|
|
71
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
72
|
+
"""
|
|
73
|
+
return self._post(
|
|
74
|
+
"/admin/chat/templates",
|
|
75
|
+
body=maybe_transform(
|
|
76
|
+
{
|
|
77
|
+
"chat_session_id": chat_session_id,
|
|
78
|
+
"description": description,
|
|
79
|
+
"display_order": display_order,
|
|
80
|
+
"image_url": image_url,
|
|
81
|
+
"is_active": is_active,
|
|
82
|
+
"title": title,
|
|
83
|
+
},
|
|
84
|
+
chat_template_create_params.ChatTemplateCreateParams,
|
|
85
|
+
),
|
|
86
|
+
options=make_request_options(
|
|
87
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
88
|
+
),
|
|
89
|
+
cast_to=ChatTemplate,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
def update(
|
|
93
|
+
self,
|
|
94
|
+
template_id: str,
|
|
95
|
+
*,
|
|
96
|
+
description: Optional[str] | Omit = omit,
|
|
97
|
+
display_order: Optional[int] | Omit = omit,
|
|
98
|
+
image_url: Optional[str] | Omit = omit,
|
|
99
|
+
is_active: Optional[bool] | Omit = omit,
|
|
100
|
+
title: Optional[str] | Omit = omit,
|
|
101
|
+
updated_by: Optional[str] | Omit = omit,
|
|
102
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
103
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
104
|
+
extra_headers: Headers | None = None,
|
|
105
|
+
extra_query: Query | None = None,
|
|
106
|
+
extra_body: Body | None = None,
|
|
107
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
108
|
+
) -> ChatTemplate:
|
|
109
|
+
"""
|
|
110
|
+
Args:
|
|
111
|
+
extra_headers: Send extra headers
|
|
112
|
+
|
|
113
|
+
extra_query: Add additional query parameters to the request
|
|
114
|
+
|
|
115
|
+
extra_body: Add additional JSON properties to the request
|
|
116
|
+
|
|
117
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
118
|
+
"""
|
|
119
|
+
if not template_id:
|
|
120
|
+
raise ValueError(f"Expected a non-empty value for `template_id` but received {template_id!r}")
|
|
121
|
+
return self._patch(
|
|
122
|
+
f"/admin/chat/templates/{template_id}",
|
|
123
|
+
body=maybe_transform(
|
|
124
|
+
{
|
|
125
|
+
"description": description,
|
|
126
|
+
"display_order": display_order,
|
|
127
|
+
"image_url": image_url,
|
|
128
|
+
"is_active": is_active,
|
|
129
|
+
"title": title,
|
|
130
|
+
"updated_by": updated_by,
|
|
131
|
+
},
|
|
132
|
+
chat_template_update_params.ChatTemplateUpdateParams,
|
|
133
|
+
),
|
|
134
|
+
options=make_request_options(
|
|
135
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
136
|
+
),
|
|
137
|
+
cast_to=ChatTemplate,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
def list(
|
|
141
|
+
self,
|
|
142
|
+
*,
|
|
143
|
+
chat_session_id: Optional[str] | Omit = omit,
|
|
144
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
145
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
146
|
+
extra_headers: Headers | None = None,
|
|
147
|
+
extra_query: Query | None = None,
|
|
148
|
+
extra_body: Body | None = None,
|
|
149
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
150
|
+
) -> ChatTemplateListResponse:
|
|
151
|
+
"""
|
|
152
|
+
Args:
|
|
153
|
+
extra_headers: Send extra headers
|
|
154
|
+
|
|
155
|
+
extra_query: Add additional query parameters to the request
|
|
156
|
+
|
|
157
|
+
extra_body: Add additional JSON properties to the request
|
|
158
|
+
|
|
159
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
160
|
+
"""
|
|
161
|
+
return self._get(
|
|
162
|
+
"/admin/chat/templates",
|
|
163
|
+
options=make_request_options(
|
|
164
|
+
extra_headers=extra_headers,
|
|
165
|
+
extra_query=extra_query,
|
|
166
|
+
extra_body=extra_body,
|
|
167
|
+
timeout=timeout,
|
|
168
|
+
query=maybe_transform(
|
|
169
|
+
{"chat_session_id": chat_session_id}, chat_template_list_params.ChatTemplateListParams
|
|
170
|
+
),
|
|
171
|
+
),
|
|
172
|
+
cast_to=ChatTemplateListResponse,
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class AsyncChatTemplatesResource(AsyncAPIResource):
|
|
177
|
+
@cached_property
|
|
178
|
+
def with_raw_response(self) -> AsyncChatTemplatesResourceWithRawResponse:
|
|
179
|
+
"""
|
|
180
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
181
|
+
the raw response object instead of the parsed content.
|
|
182
|
+
|
|
183
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#accessing-raw-response-data-eg-headers
|
|
184
|
+
"""
|
|
185
|
+
return AsyncChatTemplatesResourceWithRawResponse(self)
|
|
186
|
+
|
|
187
|
+
@cached_property
|
|
188
|
+
def with_streaming_response(self) -> AsyncChatTemplatesResourceWithStreamingResponse:
|
|
189
|
+
"""
|
|
190
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
191
|
+
|
|
192
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#with_streaming_response
|
|
193
|
+
"""
|
|
194
|
+
return AsyncChatTemplatesResourceWithStreamingResponse(self)
|
|
195
|
+
|
|
196
|
+
async def create(
|
|
197
|
+
self,
|
|
198
|
+
*,
|
|
199
|
+
chat_session_id: str,
|
|
200
|
+
description: str,
|
|
201
|
+
display_order: int,
|
|
202
|
+
image_url: str,
|
|
203
|
+
is_active: bool,
|
|
204
|
+
title: str,
|
|
205
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
206
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
207
|
+
extra_headers: Headers | None = None,
|
|
208
|
+
extra_query: Query | None = None,
|
|
209
|
+
extra_body: Body | None = None,
|
|
210
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
211
|
+
) -> ChatTemplate:
|
|
212
|
+
"""
|
|
213
|
+
Args:
|
|
214
|
+
extra_headers: Send extra headers
|
|
215
|
+
|
|
216
|
+
extra_query: Add additional query parameters to the request
|
|
217
|
+
|
|
218
|
+
extra_body: Add additional JSON properties to the request
|
|
219
|
+
|
|
220
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
221
|
+
"""
|
|
222
|
+
return await self._post(
|
|
223
|
+
"/admin/chat/templates",
|
|
224
|
+
body=await async_maybe_transform(
|
|
225
|
+
{
|
|
226
|
+
"chat_session_id": chat_session_id,
|
|
227
|
+
"description": description,
|
|
228
|
+
"display_order": display_order,
|
|
229
|
+
"image_url": image_url,
|
|
230
|
+
"is_active": is_active,
|
|
231
|
+
"title": title,
|
|
232
|
+
},
|
|
233
|
+
chat_template_create_params.ChatTemplateCreateParams,
|
|
234
|
+
),
|
|
235
|
+
options=make_request_options(
|
|
236
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
237
|
+
),
|
|
238
|
+
cast_to=ChatTemplate,
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
async def update(
|
|
242
|
+
self,
|
|
243
|
+
template_id: str,
|
|
244
|
+
*,
|
|
245
|
+
description: Optional[str] | Omit = omit,
|
|
246
|
+
display_order: Optional[int] | Omit = omit,
|
|
247
|
+
image_url: Optional[str] | Omit = omit,
|
|
248
|
+
is_active: Optional[bool] | Omit = omit,
|
|
249
|
+
title: Optional[str] | Omit = omit,
|
|
250
|
+
updated_by: Optional[str] | Omit = omit,
|
|
251
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
252
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
253
|
+
extra_headers: Headers | None = None,
|
|
254
|
+
extra_query: Query | None = None,
|
|
255
|
+
extra_body: Body | None = None,
|
|
256
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
257
|
+
) -> ChatTemplate:
|
|
258
|
+
"""
|
|
259
|
+
Args:
|
|
260
|
+
extra_headers: Send extra headers
|
|
261
|
+
|
|
262
|
+
extra_query: Add additional query parameters to the request
|
|
263
|
+
|
|
264
|
+
extra_body: Add additional JSON properties to the request
|
|
265
|
+
|
|
266
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
267
|
+
"""
|
|
268
|
+
if not template_id:
|
|
269
|
+
raise ValueError(f"Expected a non-empty value for `template_id` but received {template_id!r}")
|
|
270
|
+
return await self._patch(
|
|
271
|
+
f"/admin/chat/templates/{template_id}",
|
|
272
|
+
body=await async_maybe_transform(
|
|
273
|
+
{
|
|
274
|
+
"description": description,
|
|
275
|
+
"display_order": display_order,
|
|
276
|
+
"image_url": image_url,
|
|
277
|
+
"is_active": is_active,
|
|
278
|
+
"title": title,
|
|
279
|
+
"updated_by": updated_by,
|
|
280
|
+
},
|
|
281
|
+
chat_template_update_params.ChatTemplateUpdateParams,
|
|
282
|
+
),
|
|
283
|
+
options=make_request_options(
|
|
284
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
285
|
+
),
|
|
286
|
+
cast_to=ChatTemplate,
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
async def list(
|
|
290
|
+
self,
|
|
291
|
+
*,
|
|
292
|
+
chat_session_id: Optional[str] | Omit = omit,
|
|
293
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
294
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
295
|
+
extra_headers: Headers | None = None,
|
|
296
|
+
extra_query: Query | None = None,
|
|
297
|
+
extra_body: Body | None = None,
|
|
298
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
299
|
+
) -> ChatTemplateListResponse:
|
|
300
|
+
"""
|
|
301
|
+
Args:
|
|
302
|
+
extra_headers: Send extra headers
|
|
303
|
+
|
|
304
|
+
extra_query: Add additional query parameters to the request
|
|
305
|
+
|
|
306
|
+
extra_body: Add additional JSON properties to the request
|
|
307
|
+
|
|
308
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
309
|
+
"""
|
|
310
|
+
return await self._get(
|
|
311
|
+
"/admin/chat/templates",
|
|
312
|
+
options=make_request_options(
|
|
313
|
+
extra_headers=extra_headers,
|
|
314
|
+
extra_query=extra_query,
|
|
315
|
+
extra_body=extra_body,
|
|
316
|
+
timeout=timeout,
|
|
317
|
+
query=await async_maybe_transform(
|
|
318
|
+
{"chat_session_id": chat_session_id}, chat_template_list_params.ChatTemplateListParams
|
|
319
|
+
),
|
|
320
|
+
),
|
|
321
|
+
cast_to=ChatTemplateListResponse,
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
class ChatTemplatesResourceWithRawResponse:
|
|
326
|
+
def __init__(self, chat_templates: ChatTemplatesResource) -> None:
|
|
327
|
+
self._chat_templates = chat_templates
|
|
328
|
+
|
|
329
|
+
self.create = to_raw_response_wrapper(
|
|
330
|
+
chat_templates.create,
|
|
331
|
+
)
|
|
332
|
+
self.update = to_raw_response_wrapper(
|
|
333
|
+
chat_templates.update,
|
|
334
|
+
)
|
|
335
|
+
self.list = to_raw_response_wrapper(
|
|
336
|
+
chat_templates.list,
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
class AsyncChatTemplatesResourceWithRawResponse:
|
|
341
|
+
def __init__(self, chat_templates: AsyncChatTemplatesResource) -> None:
|
|
342
|
+
self._chat_templates = chat_templates
|
|
343
|
+
|
|
344
|
+
self.create = async_to_raw_response_wrapper(
|
|
345
|
+
chat_templates.create,
|
|
346
|
+
)
|
|
347
|
+
self.update = async_to_raw_response_wrapper(
|
|
348
|
+
chat_templates.update,
|
|
349
|
+
)
|
|
350
|
+
self.list = async_to_raw_response_wrapper(
|
|
351
|
+
chat_templates.list,
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class ChatTemplatesResourceWithStreamingResponse:
|
|
356
|
+
def __init__(self, chat_templates: ChatTemplatesResource) -> None:
|
|
357
|
+
self._chat_templates = chat_templates
|
|
358
|
+
|
|
359
|
+
self.create = to_streamed_response_wrapper(
|
|
360
|
+
chat_templates.create,
|
|
361
|
+
)
|
|
362
|
+
self.update = to_streamed_response_wrapper(
|
|
363
|
+
chat_templates.update,
|
|
364
|
+
)
|
|
365
|
+
self.list = to_streamed_response_wrapper(
|
|
366
|
+
chat_templates.list,
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
class AsyncChatTemplatesResourceWithStreamingResponse:
|
|
371
|
+
def __init__(self, chat_templates: AsyncChatTemplatesResource) -> None:
|
|
372
|
+
self._chat_templates = chat_templates
|
|
373
|
+
|
|
374
|
+
self.create = async_to_streamed_response_wrapper(
|
|
375
|
+
chat_templates.create,
|
|
376
|
+
)
|
|
377
|
+
self.update = async_to_streamed_response_wrapper(
|
|
378
|
+
chat_templates.update,
|
|
379
|
+
)
|
|
380
|
+
self.list = async_to_streamed_response_wrapper(
|
|
381
|
+
chat_templates.list,
|
|
382
|
+
)
|