langwatch-scenario 0.4.0__py3-none-any.whl → 0.7.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.
- {langwatch_scenario-0.4.0.dist-info → langwatch_scenario-0.7.1.dist-info}/METADATA +210 -86
- langwatch_scenario-0.7.1.dist-info/RECORD +237 -0
- scenario/__init__.py +12 -118
- scenario/_events/__init__.py +64 -0
- scenario/_events/event_bus.py +185 -0
- scenario/_events/event_reporter.py +83 -0
- scenario/_events/events.py +162 -0
- scenario/_events/messages.py +58 -0
- scenario/_events/utils.py +97 -0
- scenario/_generated/langwatch_api_client/README.md +139 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/__init__.py +13 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_annotations_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_prompts_by_id.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_scenario_events.py +183 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations.py +136 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations_trace_id.py +160 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_dataset_by_slug_or_id.py +229 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts.py +188 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts_by_id.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts_by_id_versions.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_trace_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/patch_api_annotations_id.py +178 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_annotations_trace_id.py +178 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_dataset_by_slug_entries.py +108 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_prompts.py +187 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_prompts_by_id_versions.py +241 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_scenario_events.py +229 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_trace_id_share.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_trace_id_unshare.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/put_api_prompts_by_id.py +241 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/traces/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/traces/post_api_trace_search.py +168 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/client.py +268 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/errors.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/__init__.py +455 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/annotation.py +131 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/dataset_post_entries.py +74 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/dataset_post_entries_entries_item.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_annotations_id_response_200.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_200.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_400.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_401.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/error.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/evaluation.py +164 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/evaluation_timestamps.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200.py +75 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200_data_item.py +109 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200_data_item_entry.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_400.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_401.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_404.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_422.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_500.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data.py +204 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations.py +101 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200.py +249 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_error_type_0.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item.py +152 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item_error.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item_timestamps.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_input.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_metrics.py +95 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_output.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item.py +271 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_error_type_0.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_input.py +90 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_input_value_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_metrics.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_output.py +89 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_output_value_item.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_params.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_timestamps.py +95 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_timestamps.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/input_.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/metrics.py +115 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/output.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/pagination.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/patch_api_annotations_id_body.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/patch_api_annotations_id_response_200.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_annotations_trace_id_body.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_body.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body.py +147 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data.py +207 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations.py +106 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data.py +206 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations.py +101 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_0.py +127 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_0_metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1.py +164 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_results_type_0.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_results_type_0_verdict.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_status.py +13 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2.py +245 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_0.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_1.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2.py +120 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item.py +87 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item_function.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_3.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_4.py +85 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_201.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_400.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_401.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_trace_id_share_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_trace_id_unshare_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_body.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_200.py +75 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request.py +133 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request_filters.py +51 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_response.py +93 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/timestamps.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/trace.py +225 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/py.typed +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/types.py +46 -0
- scenario/_generated/langwatch_api_client/pyproject.toml +27 -0
- scenario/_utils/__init__.py +32 -0
- scenario/_utils/ids.py +58 -0
- scenario/_utils/message_conversion.py +103 -0
- scenario/{utils.py → _utils/utils.py} +21 -110
- scenario/agent_adapter.py +8 -4
- scenario/cache.py +4 -3
- scenario/config.py +7 -5
- scenario/judge_agent.py +13 -29
- scenario/pytest_plugin.py +6 -51
- scenario/scenario_executor.py +372 -215
- scenario/scenario_state.py +6 -6
- scenario/script.py +9 -9
- scenario/types.py +15 -8
- scenario/user_simulator_agent.py +4 -11
- langwatch_scenario-0.4.0.dist-info/RECORD +0 -18
- {langwatch_scenario-0.4.0.dist-info → langwatch_scenario-0.7.1.dist-info}/WHEEL +0 -0
- {langwatch_scenario-0.4.0.dist-info → langwatch_scenario-0.7.1.dist-info}/entry_points.txt +0 -0
- {langwatch_scenario-0.4.0.dist-info → langwatch_scenario-0.7.1.dist-info}/top_level.txt +0 -0
- /scenario/{error_messages.py → _error_messages.py} +0 -0
@@ -0,0 +1,139 @@
|
|
1
|
+
# lang-watch-api-client
|
2
|
+
**⚠️ AUTO-GENERATED CODE - DO NOT EDIT MANUALLY ⚠️**
|
3
|
+
|
4
|
+
This is an auto-generated client library for accessing LangWatch API, created using `openapi-python-client`.
|
5
|
+
|
6
|
+
## Regeneration
|
7
|
+
To regenerate this client:
|
8
|
+
```bash
|
9
|
+
make generate-openapi-client
|
10
|
+
```
|
11
|
+
|
12
|
+
## Source
|
13
|
+
Generated from: `../langwatch-saas/langwatch/langwatch/src/app/api/openapiLangWatch.json`
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
A client library for accessing LangWatch API
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
First, create a client:
|
21
|
+
|
22
|
+
```python
|
23
|
+
from lang_watch_api_client import Client
|
24
|
+
|
25
|
+
client = Client(base_url="https://api.langwatch.ai")
|
26
|
+
```
|
27
|
+
|
28
|
+
If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
|
29
|
+
|
30
|
+
```python
|
31
|
+
from lang_watch_api_client import AuthenticatedClient
|
32
|
+
|
33
|
+
client = AuthenticatedClient(base_url="https://api.langwatch.ai", token="SuperSecretToken")
|
34
|
+
```
|
35
|
+
|
36
|
+
Now call your endpoint and use your models:
|
37
|
+
|
38
|
+
```python
|
39
|
+
from lang_watch_api_client.models import MyDataModel
|
40
|
+
from lang_watch_api_client.api.my_tag import get_my_data_model
|
41
|
+
from lang_watch_api_client.types import Response
|
42
|
+
|
43
|
+
with client as client:
|
44
|
+
my_data: MyDataModel = get_my_data_model.sync(client=client)
|
45
|
+
# or if you need more info (e.g. status_code)
|
46
|
+
response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
|
47
|
+
```
|
48
|
+
|
49
|
+
Or do the same thing with an async version:
|
50
|
+
|
51
|
+
```python
|
52
|
+
from lang_watch_api_client.models import MyDataModel
|
53
|
+
from lang_watch_api_client.api.my_tag import get_my_data_model
|
54
|
+
from lang_watch_api_client.types import Response
|
55
|
+
|
56
|
+
async with client as client:
|
57
|
+
my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
|
58
|
+
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
|
59
|
+
```
|
60
|
+
|
61
|
+
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
|
62
|
+
|
63
|
+
```python
|
64
|
+
client = AuthenticatedClient(
|
65
|
+
base_url="https://internal_api.langwatch.ai",
|
66
|
+
token="SuperSecretToken",
|
67
|
+
verify_ssl="/path/to/certificate_bundle.pem",
|
68
|
+
)
|
69
|
+
```
|
70
|
+
|
71
|
+
You can also disable certificate validation altogether, but beware that **this is a security risk**.
|
72
|
+
|
73
|
+
```python
|
74
|
+
client = AuthenticatedClient(
|
75
|
+
base_url="https://internal_api.langwatch.ai",
|
76
|
+
token="SuperSecretToken",
|
77
|
+
verify_ssl=False
|
78
|
+
)
|
79
|
+
```
|
80
|
+
|
81
|
+
Things to know:
|
82
|
+
1. Every path/method combo becomes a Python module with four functions:
|
83
|
+
1. `sync`: Blocking request that returns parsed data (if successful) or `None`
|
84
|
+
1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
|
85
|
+
1. `asyncio`: Like `sync` but async instead of blocking
|
86
|
+
1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
|
87
|
+
|
88
|
+
1. All path/query params, and bodies become method arguments.
|
89
|
+
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
|
90
|
+
1. Any endpoint which did not have a tag will be in `lang_watch_api_client.api.default`
|
91
|
+
|
92
|
+
## Advanced customizations
|
93
|
+
|
94
|
+
There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):
|
95
|
+
|
96
|
+
```python
|
97
|
+
from lang_watch_api_client import Client
|
98
|
+
|
99
|
+
def log_request(request):
|
100
|
+
print(f"Request event hook: {request.method} {request.url} - Waiting for response")
|
101
|
+
|
102
|
+
def log_response(response):
|
103
|
+
request = response.request
|
104
|
+
print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
|
105
|
+
|
106
|
+
client = Client(
|
107
|
+
base_url="https://api.langwatch.ai",
|
108
|
+
httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
|
109
|
+
)
|
110
|
+
|
111
|
+
# Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()
|
112
|
+
```
|
113
|
+
|
114
|
+
You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):
|
115
|
+
|
116
|
+
```python
|
117
|
+
import httpx
|
118
|
+
from lang_watch_api_client import Client
|
119
|
+
|
120
|
+
client = Client(
|
121
|
+
base_url="https://api.langwatch.ai",
|
122
|
+
)
|
123
|
+
# Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
|
124
|
+
client.set_httpx_client(httpx.Client(base_url="https://api.langwatch.ai", proxies="http://localhost:8030"))
|
125
|
+
```
|
126
|
+
|
127
|
+
## Building / publishing this package
|
128
|
+
This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics:
|
129
|
+
1. Update the metadata in pyproject.toml (e.g. authors, version)
|
130
|
+
1. If you're using a private repository, configure it with Poetry
|
131
|
+
1. `poetry config repositories.<your-repository-name> <url-to-your-repository>`
|
132
|
+
1. `poetry config http-basic.<your-repository-name> <username> <password>`
|
133
|
+
1. Publish the client with `poetry publish --build -r <your-repository-name>` or, if for public PyPI, just `poetry publish --build`
|
134
|
+
|
135
|
+
If you want to install this client into another project without publishing it (e.g. for development) then:
|
136
|
+
1. If that project **is using Poetry**, you can simply do `poetry add <path-to-this-client>` from that project
|
137
|
+
1. If that project is not using Poetry:
|
138
|
+
1. Build a wheel with `poetry build -f wheel`
|
139
|
+
1. Install that wheel from the other project `pip install <path-to-wheel>`
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# AUTO-GENERATED CODE - DO NOT EDIT MANUALLY
|
2
|
+
# Generated by openapi-python-client from ../../langwatch-saas/langwatch/langwatch/src/app/api/openapiLangWatch.json
|
3
|
+
#
|
4
|
+
# To regenerate: make generate-openapi-client
|
5
|
+
|
6
|
+
"""A client library for accessing LangWatch API"""
|
7
|
+
|
8
|
+
from .client import AuthenticatedClient, Client
|
9
|
+
|
10
|
+
__all__ = (
|
11
|
+
"AuthenticatedClient",
|
12
|
+
"Client",
|
13
|
+
)
|
@@ -0,0 +1 @@
|
|
1
|
+
"""Contains methods for accessing the API"""
|
@@ -0,0 +1 @@
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
@@ -0,0 +1,155 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...models.delete_api_annotations_id_response_200 import DeleteApiAnnotationsIdResponse200
|
9
|
+
from ...models.error import Error
|
10
|
+
from ...types import Response
|
11
|
+
|
12
|
+
|
13
|
+
def _get_kwargs(
|
14
|
+
id: str,
|
15
|
+
) -> dict[str, Any]:
|
16
|
+
_kwargs: dict[str, Any] = {
|
17
|
+
"method": "delete",
|
18
|
+
"url": f"/api/annotations/{id}",
|
19
|
+
}
|
20
|
+
|
21
|
+
return _kwargs
|
22
|
+
|
23
|
+
|
24
|
+
def _parse_response(
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
26
|
+
) -> Optional[Union[DeleteApiAnnotationsIdResponse200, Error]]:
|
27
|
+
if response.status_code == 200:
|
28
|
+
response_200 = DeleteApiAnnotationsIdResponse200.from_dict(response.json())
|
29
|
+
|
30
|
+
return response_200
|
31
|
+
if response.status_code == 400:
|
32
|
+
response_400 = Error.from_dict(response.json())
|
33
|
+
|
34
|
+
return response_400
|
35
|
+
if client.raise_on_unexpected_status:
|
36
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
37
|
+
else:
|
38
|
+
return None
|
39
|
+
|
40
|
+
|
41
|
+
def _build_response(
|
42
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
43
|
+
) -> Response[Union[DeleteApiAnnotationsIdResponse200, Error]]:
|
44
|
+
return Response(
|
45
|
+
status_code=HTTPStatus(response.status_code),
|
46
|
+
content=response.content,
|
47
|
+
headers=response.headers,
|
48
|
+
parsed=_parse_response(client=client, response=response),
|
49
|
+
)
|
50
|
+
|
51
|
+
|
52
|
+
def sync_detailed(
|
53
|
+
id: str,
|
54
|
+
*,
|
55
|
+
client: Union[AuthenticatedClient, Client],
|
56
|
+
) -> Response[Union[DeleteApiAnnotationsIdResponse200, Error]]:
|
57
|
+
"""Deletes a single annotation based on the ID supplied
|
58
|
+
|
59
|
+
Args:
|
60
|
+
id (str):
|
61
|
+
|
62
|
+
Raises:
|
63
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
64
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
65
|
+
|
66
|
+
Returns:
|
67
|
+
Response[Union[DeleteApiAnnotationsIdResponse200, Error]]
|
68
|
+
"""
|
69
|
+
|
70
|
+
kwargs = _get_kwargs(
|
71
|
+
id=id,
|
72
|
+
)
|
73
|
+
|
74
|
+
response = client.get_httpx_client().request(
|
75
|
+
**kwargs,
|
76
|
+
)
|
77
|
+
|
78
|
+
return _build_response(client=client, response=response)
|
79
|
+
|
80
|
+
|
81
|
+
def sync(
|
82
|
+
id: str,
|
83
|
+
*,
|
84
|
+
client: Union[AuthenticatedClient, Client],
|
85
|
+
) -> Optional[Union[DeleteApiAnnotationsIdResponse200, Error]]:
|
86
|
+
"""Deletes a single annotation based on the ID supplied
|
87
|
+
|
88
|
+
Args:
|
89
|
+
id (str):
|
90
|
+
|
91
|
+
Raises:
|
92
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
93
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
94
|
+
|
95
|
+
Returns:
|
96
|
+
Union[DeleteApiAnnotationsIdResponse200, Error]
|
97
|
+
"""
|
98
|
+
|
99
|
+
return sync_detailed(
|
100
|
+
id=id,
|
101
|
+
client=client,
|
102
|
+
).parsed
|
103
|
+
|
104
|
+
|
105
|
+
async def asyncio_detailed(
|
106
|
+
id: str,
|
107
|
+
*,
|
108
|
+
client: Union[AuthenticatedClient, Client],
|
109
|
+
) -> Response[Union[DeleteApiAnnotationsIdResponse200, Error]]:
|
110
|
+
"""Deletes a single annotation based on the ID supplied
|
111
|
+
|
112
|
+
Args:
|
113
|
+
id (str):
|
114
|
+
|
115
|
+
Raises:
|
116
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
117
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
118
|
+
|
119
|
+
Returns:
|
120
|
+
Response[Union[DeleteApiAnnotationsIdResponse200, Error]]
|
121
|
+
"""
|
122
|
+
|
123
|
+
kwargs = _get_kwargs(
|
124
|
+
id=id,
|
125
|
+
)
|
126
|
+
|
127
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
128
|
+
|
129
|
+
return _build_response(client=client, response=response)
|
130
|
+
|
131
|
+
|
132
|
+
async def asyncio(
|
133
|
+
id: str,
|
134
|
+
*,
|
135
|
+
client: Union[AuthenticatedClient, Client],
|
136
|
+
) -> Optional[Union[DeleteApiAnnotationsIdResponse200, Error]]:
|
137
|
+
"""Deletes a single annotation based on the ID supplied
|
138
|
+
|
139
|
+
Args:
|
140
|
+
id (str):
|
141
|
+
|
142
|
+
Raises:
|
143
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
144
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
145
|
+
|
146
|
+
Returns:
|
147
|
+
Union[DeleteApiAnnotationsIdResponse200, Error]
|
148
|
+
"""
|
149
|
+
|
150
|
+
return (
|
151
|
+
await asyncio_detailed(
|
152
|
+
id=id,
|
153
|
+
client=client,
|
154
|
+
)
|
155
|
+
).parsed
|
@@ -0,0 +1,218 @@
|
|
1
|
+
from http import HTTPStatus
|
2
|
+
from typing import Any, Optional, Union
|
3
|
+
|
4
|
+
import httpx
|
5
|
+
|
6
|
+
from ... import errors
|
7
|
+
from ...client import AuthenticatedClient, Client
|
8
|
+
from ...models.delete_api_prompts_by_id_response_200 import DeleteApiPromptsByIdResponse200
|
9
|
+
from ...models.delete_api_prompts_by_id_response_400 import DeleteApiPromptsByIdResponse400
|
10
|
+
from ...models.delete_api_prompts_by_id_response_401 import DeleteApiPromptsByIdResponse401
|
11
|
+
from ...models.delete_api_prompts_by_id_response_404 import DeleteApiPromptsByIdResponse404
|
12
|
+
from ...models.delete_api_prompts_by_id_response_500 import DeleteApiPromptsByIdResponse500
|
13
|
+
from ...types import Response
|
14
|
+
|
15
|
+
|
16
|
+
def _get_kwargs(
|
17
|
+
id: str,
|
18
|
+
) -> dict[str, Any]:
|
19
|
+
_kwargs: dict[str, Any] = {
|
20
|
+
"method": "delete",
|
21
|
+
"url": f"/api/prompts/{id}",
|
22
|
+
}
|
23
|
+
|
24
|
+
return _kwargs
|
25
|
+
|
26
|
+
|
27
|
+
def _parse_response(
|
28
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
29
|
+
) -> Optional[
|
30
|
+
Union[
|
31
|
+
DeleteApiPromptsByIdResponse200,
|
32
|
+
DeleteApiPromptsByIdResponse400,
|
33
|
+
DeleteApiPromptsByIdResponse401,
|
34
|
+
DeleteApiPromptsByIdResponse404,
|
35
|
+
DeleteApiPromptsByIdResponse500,
|
36
|
+
]
|
37
|
+
]:
|
38
|
+
if response.status_code == 200:
|
39
|
+
response_200 = DeleteApiPromptsByIdResponse200.from_dict(response.json())
|
40
|
+
|
41
|
+
return response_200
|
42
|
+
if response.status_code == 400:
|
43
|
+
response_400 = DeleteApiPromptsByIdResponse400.from_dict(response.json())
|
44
|
+
|
45
|
+
return response_400
|
46
|
+
if response.status_code == 401:
|
47
|
+
response_401 = DeleteApiPromptsByIdResponse401.from_dict(response.json())
|
48
|
+
|
49
|
+
return response_401
|
50
|
+
if response.status_code == 404:
|
51
|
+
response_404 = DeleteApiPromptsByIdResponse404.from_dict(response.json())
|
52
|
+
|
53
|
+
return response_404
|
54
|
+
if response.status_code == 500:
|
55
|
+
response_500 = DeleteApiPromptsByIdResponse500.from_dict(response.json())
|
56
|
+
|
57
|
+
return response_500
|
58
|
+
if client.raise_on_unexpected_status:
|
59
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
60
|
+
else:
|
61
|
+
return None
|
62
|
+
|
63
|
+
|
64
|
+
def _build_response(
|
65
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
66
|
+
) -> Response[
|
67
|
+
Union[
|
68
|
+
DeleteApiPromptsByIdResponse200,
|
69
|
+
DeleteApiPromptsByIdResponse400,
|
70
|
+
DeleteApiPromptsByIdResponse401,
|
71
|
+
DeleteApiPromptsByIdResponse404,
|
72
|
+
DeleteApiPromptsByIdResponse500,
|
73
|
+
]
|
74
|
+
]:
|
75
|
+
return Response(
|
76
|
+
status_code=HTTPStatus(response.status_code),
|
77
|
+
content=response.content,
|
78
|
+
headers=response.headers,
|
79
|
+
parsed=_parse_response(client=client, response=response),
|
80
|
+
)
|
81
|
+
|
82
|
+
|
83
|
+
def sync_detailed(
|
84
|
+
id: str,
|
85
|
+
*,
|
86
|
+
client: Union[AuthenticatedClient, Client],
|
87
|
+
) -> Response[
|
88
|
+
Union[
|
89
|
+
DeleteApiPromptsByIdResponse200,
|
90
|
+
DeleteApiPromptsByIdResponse400,
|
91
|
+
DeleteApiPromptsByIdResponse401,
|
92
|
+
DeleteApiPromptsByIdResponse404,
|
93
|
+
DeleteApiPromptsByIdResponse500,
|
94
|
+
]
|
95
|
+
]:
|
96
|
+
"""Delete a prompt
|
97
|
+
|
98
|
+
Args:
|
99
|
+
id (str):
|
100
|
+
|
101
|
+
Raises:
|
102
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
103
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
104
|
+
|
105
|
+
Returns:
|
106
|
+
Response[Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]]
|
107
|
+
"""
|
108
|
+
|
109
|
+
kwargs = _get_kwargs(
|
110
|
+
id=id,
|
111
|
+
)
|
112
|
+
|
113
|
+
response = client.get_httpx_client().request(
|
114
|
+
**kwargs,
|
115
|
+
)
|
116
|
+
|
117
|
+
return _build_response(client=client, response=response)
|
118
|
+
|
119
|
+
|
120
|
+
def sync(
|
121
|
+
id: str,
|
122
|
+
*,
|
123
|
+
client: Union[AuthenticatedClient, Client],
|
124
|
+
) -> Optional[
|
125
|
+
Union[
|
126
|
+
DeleteApiPromptsByIdResponse200,
|
127
|
+
DeleteApiPromptsByIdResponse400,
|
128
|
+
DeleteApiPromptsByIdResponse401,
|
129
|
+
DeleteApiPromptsByIdResponse404,
|
130
|
+
DeleteApiPromptsByIdResponse500,
|
131
|
+
]
|
132
|
+
]:
|
133
|
+
"""Delete a prompt
|
134
|
+
|
135
|
+
Args:
|
136
|
+
id (str):
|
137
|
+
|
138
|
+
Raises:
|
139
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
140
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
141
|
+
|
142
|
+
Returns:
|
143
|
+
Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]
|
144
|
+
"""
|
145
|
+
|
146
|
+
return sync_detailed(
|
147
|
+
id=id,
|
148
|
+
client=client,
|
149
|
+
).parsed
|
150
|
+
|
151
|
+
|
152
|
+
async def asyncio_detailed(
|
153
|
+
id: str,
|
154
|
+
*,
|
155
|
+
client: Union[AuthenticatedClient, Client],
|
156
|
+
) -> Response[
|
157
|
+
Union[
|
158
|
+
DeleteApiPromptsByIdResponse200,
|
159
|
+
DeleteApiPromptsByIdResponse400,
|
160
|
+
DeleteApiPromptsByIdResponse401,
|
161
|
+
DeleteApiPromptsByIdResponse404,
|
162
|
+
DeleteApiPromptsByIdResponse500,
|
163
|
+
]
|
164
|
+
]:
|
165
|
+
"""Delete a prompt
|
166
|
+
|
167
|
+
Args:
|
168
|
+
id (str):
|
169
|
+
|
170
|
+
Raises:
|
171
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
172
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
173
|
+
|
174
|
+
Returns:
|
175
|
+
Response[Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]]
|
176
|
+
"""
|
177
|
+
|
178
|
+
kwargs = _get_kwargs(
|
179
|
+
id=id,
|
180
|
+
)
|
181
|
+
|
182
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
183
|
+
|
184
|
+
return _build_response(client=client, response=response)
|
185
|
+
|
186
|
+
|
187
|
+
async def asyncio(
|
188
|
+
id: str,
|
189
|
+
*,
|
190
|
+
client: Union[AuthenticatedClient, Client],
|
191
|
+
) -> Optional[
|
192
|
+
Union[
|
193
|
+
DeleteApiPromptsByIdResponse200,
|
194
|
+
DeleteApiPromptsByIdResponse400,
|
195
|
+
DeleteApiPromptsByIdResponse401,
|
196
|
+
DeleteApiPromptsByIdResponse404,
|
197
|
+
DeleteApiPromptsByIdResponse500,
|
198
|
+
]
|
199
|
+
]:
|
200
|
+
"""Delete a prompt
|
201
|
+
|
202
|
+
Args:
|
203
|
+
id (str):
|
204
|
+
|
205
|
+
Raises:
|
206
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
207
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
208
|
+
|
209
|
+
Returns:
|
210
|
+
Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]
|
211
|
+
"""
|
212
|
+
|
213
|
+
return (
|
214
|
+
await asyncio_detailed(
|
215
|
+
id=id,
|
216
|
+
client=client,
|
217
|
+
)
|
218
|
+
).parsed
|