langwatch-scenario 0.6.0__py3-none-any.whl → 0.7.2__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.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/METADATA +145 -41
- langwatch_scenario-0.7.2.dist-info/RECORD +237 -0
- scenario/__init__.py +1 -4
- scenario/{events → _events}/__init__.py +9 -11
- scenario/_events/event_bus.py +185 -0
- scenario/{events → _events}/event_reporter.py +1 -1
- scenario/{events → _events}/events.py +20 -27
- scenario/_events/messages.py +58 -0
- scenario/{events → _events}/utils.py +43 -32
- 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 +1 -1
- scenario/_utils/message_conversion.py +2 -2
- scenario/judge_agent.py +6 -1
- scenario/pytest_plugin.py +4 -4
- scenario/scenario_executor.py +196 -223
- scenario/types.py +5 -2
- langwatch_scenario-0.6.0.dist-info/RECORD +0 -27
- scenario/events/event_bus.py +0 -175
- scenario/events/messages.py +0 -84
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/WHEEL +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/entry_points.txt +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,127 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from ..models.post_api_scenario_events_body_type_0_metadata import PostApiScenarioEventsBodyType0Metadata
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="PostApiScenarioEventsBodyType0")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class PostApiScenarioEventsBodyType0:
|
18
|
+
"""
|
19
|
+
Attributes:
|
20
|
+
type_ (Literal['SCENARIO_RUN_STARTED']):
|
21
|
+
timestamp (float):
|
22
|
+
batch_run_id (str):
|
23
|
+
scenario_id (str):
|
24
|
+
scenario_run_id (str):
|
25
|
+
metadata (PostApiScenarioEventsBodyType0Metadata):
|
26
|
+
raw_event (Union[Unset, Any]):
|
27
|
+
scenario_set_id (Union[Unset, str]): Default: 'default'.
|
28
|
+
"""
|
29
|
+
|
30
|
+
type_: Literal["SCENARIO_RUN_STARTED"]
|
31
|
+
timestamp: float
|
32
|
+
batch_run_id: str
|
33
|
+
scenario_id: str
|
34
|
+
scenario_run_id: str
|
35
|
+
metadata: "PostApiScenarioEventsBodyType0Metadata"
|
36
|
+
raw_event: Union[Unset, Any] = UNSET
|
37
|
+
scenario_set_id: Union[Unset, str] = "default"
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
39
|
+
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
41
|
+
type_ = self.type_
|
42
|
+
|
43
|
+
timestamp = self.timestamp
|
44
|
+
|
45
|
+
batch_run_id = self.batch_run_id
|
46
|
+
|
47
|
+
scenario_id = self.scenario_id
|
48
|
+
|
49
|
+
scenario_run_id = self.scenario_run_id
|
50
|
+
|
51
|
+
metadata = self.metadata.to_dict()
|
52
|
+
|
53
|
+
raw_event = self.raw_event
|
54
|
+
|
55
|
+
scenario_set_id = self.scenario_set_id
|
56
|
+
|
57
|
+
field_dict: dict[str, Any] = {}
|
58
|
+
field_dict.update(self.additional_properties)
|
59
|
+
field_dict.update(
|
60
|
+
{
|
61
|
+
"type": type_,
|
62
|
+
"timestamp": timestamp,
|
63
|
+
"batchRunId": batch_run_id,
|
64
|
+
"scenarioId": scenario_id,
|
65
|
+
"scenarioRunId": scenario_run_id,
|
66
|
+
"metadata": metadata,
|
67
|
+
}
|
68
|
+
)
|
69
|
+
if raw_event is not UNSET:
|
70
|
+
field_dict["rawEvent"] = raw_event
|
71
|
+
if scenario_set_id is not UNSET:
|
72
|
+
field_dict["scenarioSetId"] = scenario_set_id
|
73
|
+
|
74
|
+
return field_dict
|
75
|
+
|
76
|
+
@classmethod
|
77
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
78
|
+
from ..models.post_api_scenario_events_body_type_0_metadata import PostApiScenarioEventsBodyType0Metadata
|
79
|
+
|
80
|
+
d = dict(src_dict)
|
81
|
+
type_ = cast(Literal["SCENARIO_RUN_STARTED"], d.pop("type"))
|
82
|
+
if type_ != "SCENARIO_RUN_STARTED":
|
83
|
+
raise ValueError(f"type must match const 'SCENARIO_RUN_STARTED', got '{type_}'")
|
84
|
+
|
85
|
+
timestamp = d.pop("timestamp")
|
86
|
+
|
87
|
+
batch_run_id = d.pop("batchRunId")
|
88
|
+
|
89
|
+
scenario_id = d.pop("scenarioId")
|
90
|
+
|
91
|
+
scenario_run_id = d.pop("scenarioRunId")
|
92
|
+
|
93
|
+
metadata = PostApiScenarioEventsBodyType0Metadata.from_dict(d.pop("metadata"))
|
94
|
+
|
95
|
+
raw_event = d.pop("rawEvent", UNSET)
|
96
|
+
|
97
|
+
scenario_set_id = d.pop("scenarioSetId", UNSET)
|
98
|
+
|
99
|
+
post_api_scenario_events_body_type_0 = cls(
|
100
|
+
type_=type_,
|
101
|
+
timestamp=timestamp,
|
102
|
+
batch_run_id=batch_run_id,
|
103
|
+
scenario_id=scenario_id,
|
104
|
+
scenario_run_id=scenario_run_id,
|
105
|
+
metadata=metadata,
|
106
|
+
raw_event=raw_event,
|
107
|
+
scenario_set_id=scenario_set_id,
|
108
|
+
)
|
109
|
+
|
110
|
+
post_api_scenario_events_body_type_0.additional_properties = d
|
111
|
+
return post_api_scenario_events_body_type_0
|
112
|
+
|
113
|
+
@property
|
114
|
+
def additional_keys(self) -> list[str]:
|
115
|
+
return list(self.additional_properties.keys())
|
116
|
+
|
117
|
+
def __getitem__(self, key: str) -> Any:
|
118
|
+
return self.additional_properties[key]
|
119
|
+
|
120
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
121
|
+
self.additional_properties[key] = value
|
122
|
+
|
123
|
+
def __delitem__(self, key: str) -> None:
|
124
|
+
del self.additional_properties[key]
|
125
|
+
|
126
|
+
def __contains__(self, key: str) -> bool:
|
127
|
+
return key in self.additional_properties
|
@@ -0,0 +1,68 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, Union
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PostApiScenarioEventsBodyType0Metadata")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PostApiScenarioEventsBodyType0Metadata:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
name (Union[Unset, str]):
|
17
|
+
description (Union[Unset, str]):
|
18
|
+
"""
|
19
|
+
|
20
|
+
name: Union[Unset, str] = UNSET
|
21
|
+
description: Union[Unset, str] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
name = self.name
|
26
|
+
|
27
|
+
description = self.description
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if name is not UNSET:
|
33
|
+
field_dict["name"] = name
|
34
|
+
if description is not UNSET:
|
35
|
+
field_dict["description"] = description
|
36
|
+
|
37
|
+
return field_dict
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
41
|
+
d = dict(src_dict)
|
42
|
+
name = d.pop("name", UNSET)
|
43
|
+
|
44
|
+
description = d.pop("description", UNSET)
|
45
|
+
|
46
|
+
post_api_scenario_events_body_type_0_metadata = cls(
|
47
|
+
name=name,
|
48
|
+
description=description,
|
49
|
+
)
|
50
|
+
|
51
|
+
post_api_scenario_events_body_type_0_metadata.additional_properties = d
|
52
|
+
return post_api_scenario_events_body_type_0_metadata
|
53
|
+
|
54
|
+
@property
|
55
|
+
def additional_keys(self) -> list[str]:
|
56
|
+
return list(self.additional_properties.keys())
|
57
|
+
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
59
|
+
return self.additional_properties[key]
|
60
|
+
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
62
|
+
self.additional_properties[key] = value
|
63
|
+
|
64
|
+
def __delitem__(self, key: str) -> None:
|
65
|
+
del self.additional_properties[key]
|
66
|
+
|
67
|
+
def __contains__(self, key: str) -> bool:
|
68
|
+
return key in self.additional_properties
|
@@ -0,0 +1,164 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_scenario_events_body_type_1_status import PostApiScenarioEventsBodyType1Status
|
8
|
+
from ..types import UNSET, Unset
|
9
|
+
|
10
|
+
if TYPE_CHECKING:
|
11
|
+
from ..models.post_api_scenario_events_body_type_1_results_type_0 import PostApiScenarioEventsBodyType1ResultsType0
|
12
|
+
|
13
|
+
|
14
|
+
T = TypeVar("T", bound="PostApiScenarioEventsBodyType1")
|
15
|
+
|
16
|
+
|
17
|
+
@_attrs_define
|
18
|
+
class PostApiScenarioEventsBodyType1:
|
19
|
+
"""
|
20
|
+
Attributes:
|
21
|
+
type_ (Literal['SCENARIO_RUN_FINISHED']):
|
22
|
+
timestamp (float):
|
23
|
+
batch_run_id (str):
|
24
|
+
scenario_id (str):
|
25
|
+
scenario_run_id (str):
|
26
|
+
status (PostApiScenarioEventsBodyType1Status):
|
27
|
+
raw_event (Union[Unset, Any]):
|
28
|
+
scenario_set_id (Union[Unset, str]): Default: 'default'.
|
29
|
+
results (Union['PostApiScenarioEventsBodyType1ResultsType0', None, Unset]):
|
30
|
+
"""
|
31
|
+
|
32
|
+
type_: Literal["SCENARIO_RUN_FINISHED"]
|
33
|
+
timestamp: float
|
34
|
+
batch_run_id: str
|
35
|
+
scenario_id: str
|
36
|
+
scenario_run_id: str
|
37
|
+
status: PostApiScenarioEventsBodyType1Status
|
38
|
+
raw_event: Union[Unset, Any] = UNSET
|
39
|
+
scenario_set_id: Union[Unset, str] = "default"
|
40
|
+
results: Union["PostApiScenarioEventsBodyType1ResultsType0", None, Unset] = UNSET
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
42
|
+
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
44
|
+
from ..models.post_api_scenario_events_body_type_1_results_type_0 import (
|
45
|
+
PostApiScenarioEventsBodyType1ResultsType0,
|
46
|
+
)
|
47
|
+
|
48
|
+
type_ = self.type_
|
49
|
+
|
50
|
+
timestamp = self.timestamp
|
51
|
+
|
52
|
+
batch_run_id = self.batch_run_id
|
53
|
+
|
54
|
+
scenario_id = self.scenario_id
|
55
|
+
|
56
|
+
scenario_run_id = self.scenario_run_id
|
57
|
+
|
58
|
+
status = self.status.value
|
59
|
+
|
60
|
+
raw_event = self.raw_event
|
61
|
+
|
62
|
+
scenario_set_id = self.scenario_set_id
|
63
|
+
|
64
|
+
results: Union[None, Unset, dict[str, Any]]
|
65
|
+
if isinstance(self.results, Unset):
|
66
|
+
results = UNSET
|
67
|
+
elif isinstance(self.results, PostApiScenarioEventsBodyType1ResultsType0):
|
68
|
+
results = self.results.to_dict()
|
69
|
+
else:
|
70
|
+
results = self.results
|
71
|
+
|
72
|
+
field_dict: dict[str, Any] = {}
|
73
|
+
field_dict.update(self.additional_properties)
|
74
|
+
field_dict.update(
|
75
|
+
{
|
76
|
+
"type": type_,
|
77
|
+
"timestamp": timestamp,
|
78
|
+
"batchRunId": batch_run_id,
|
79
|
+
"scenarioId": scenario_id,
|
80
|
+
"scenarioRunId": scenario_run_id,
|
81
|
+
"status": status,
|
82
|
+
}
|
83
|
+
)
|
84
|
+
if raw_event is not UNSET:
|
85
|
+
field_dict["rawEvent"] = raw_event
|
86
|
+
if scenario_set_id is not UNSET:
|
87
|
+
field_dict["scenarioSetId"] = scenario_set_id
|
88
|
+
if results is not UNSET:
|
89
|
+
field_dict["results"] = results
|
90
|
+
|
91
|
+
return field_dict
|
92
|
+
|
93
|
+
@classmethod
|
94
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
95
|
+
from ..models.post_api_scenario_events_body_type_1_results_type_0 import (
|
96
|
+
PostApiScenarioEventsBodyType1ResultsType0,
|
97
|
+
)
|
98
|
+
|
99
|
+
d = dict(src_dict)
|
100
|
+
type_ = cast(Literal["SCENARIO_RUN_FINISHED"], d.pop("type"))
|
101
|
+
if type_ != "SCENARIO_RUN_FINISHED":
|
102
|
+
raise ValueError(f"type must match const 'SCENARIO_RUN_FINISHED', got '{type_}'")
|
103
|
+
|
104
|
+
timestamp = d.pop("timestamp")
|
105
|
+
|
106
|
+
batch_run_id = d.pop("batchRunId")
|
107
|
+
|
108
|
+
scenario_id = d.pop("scenarioId")
|
109
|
+
|
110
|
+
scenario_run_id = d.pop("scenarioRunId")
|
111
|
+
|
112
|
+
status = PostApiScenarioEventsBodyType1Status(d.pop("status"))
|
113
|
+
|
114
|
+
raw_event = d.pop("rawEvent", UNSET)
|
115
|
+
|
116
|
+
scenario_set_id = d.pop("scenarioSetId", UNSET)
|
117
|
+
|
118
|
+
def _parse_results(data: object) -> Union["PostApiScenarioEventsBodyType1ResultsType0", None, Unset]:
|
119
|
+
if data is None:
|
120
|
+
return data
|
121
|
+
if isinstance(data, Unset):
|
122
|
+
return data
|
123
|
+
try:
|
124
|
+
if not isinstance(data, dict):
|
125
|
+
raise TypeError()
|
126
|
+
results_type_0 = PostApiScenarioEventsBodyType1ResultsType0.from_dict(data)
|
127
|
+
|
128
|
+
return results_type_0
|
129
|
+
except: # noqa: E722
|
130
|
+
pass
|
131
|
+
return cast(Union["PostApiScenarioEventsBodyType1ResultsType0", None, Unset], data)
|
132
|
+
|
133
|
+
results = _parse_results(d.pop("results", UNSET))
|
134
|
+
|
135
|
+
post_api_scenario_events_body_type_1 = cls(
|
136
|
+
type_=type_,
|
137
|
+
timestamp=timestamp,
|
138
|
+
batch_run_id=batch_run_id,
|
139
|
+
scenario_id=scenario_id,
|
140
|
+
scenario_run_id=scenario_run_id,
|
141
|
+
status=status,
|
142
|
+
raw_event=raw_event,
|
143
|
+
scenario_set_id=scenario_set_id,
|
144
|
+
results=results,
|
145
|
+
)
|
146
|
+
|
147
|
+
post_api_scenario_events_body_type_1.additional_properties = d
|
148
|
+
return post_api_scenario_events_body_type_1
|
149
|
+
|
150
|
+
@property
|
151
|
+
def additional_keys(self) -> list[str]:
|
152
|
+
return list(self.additional_properties.keys())
|
153
|
+
|
154
|
+
def __getitem__(self, key: str) -> Any:
|
155
|
+
return self.additional_properties[key]
|
156
|
+
|
157
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
158
|
+
self.additional_properties[key] = value
|
159
|
+
|
160
|
+
def __delitem__(self, key: str) -> None:
|
161
|
+
del self.additional_properties[key]
|
162
|
+
|
163
|
+
def __contains__(self, key: str) -> bool:
|
164
|
+
return key in self.additional_properties
|
@@ -0,0 +1,98 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_scenario_events_body_type_1_results_type_0_verdict import (
|
8
|
+
PostApiScenarioEventsBodyType1ResultsType0Verdict,
|
9
|
+
)
|
10
|
+
from ..types import UNSET, Unset
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="PostApiScenarioEventsBodyType1ResultsType0")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class PostApiScenarioEventsBodyType1ResultsType0:
|
17
|
+
"""
|
18
|
+
Attributes:
|
19
|
+
verdict (PostApiScenarioEventsBodyType1ResultsType0Verdict):
|
20
|
+
met_criteria (list[str]):
|
21
|
+
unmet_criteria (list[str]):
|
22
|
+
reasoning (Union[Unset, str]):
|
23
|
+
error (Union[Unset, str]):
|
24
|
+
"""
|
25
|
+
|
26
|
+
verdict: PostApiScenarioEventsBodyType1ResultsType0Verdict
|
27
|
+
met_criteria: list[str]
|
28
|
+
unmet_criteria: list[str]
|
29
|
+
reasoning: Union[Unset, str] = UNSET
|
30
|
+
error: Union[Unset, str] = UNSET
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
32
|
+
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
34
|
+
verdict = self.verdict.value
|
35
|
+
|
36
|
+
met_criteria = self.met_criteria
|
37
|
+
|
38
|
+
unmet_criteria = self.unmet_criteria
|
39
|
+
|
40
|
+
reasoning = self.reasoning
|
41
|
+
|
42
|
+
error = self.error
|
43
|
+
|
44
|
+
field_dict: dict[str, Any] = {}
|
45
|
+
field_dict.update(self.additional_properties)
|
46
|
+
field_dict.update(
|
47
|
+
{
|
48
|
+
"verdict": verdict,
|
49
|
+
"metCriteria": met_criteria,
|
50
|
+
"unmetCriteria": unmet_criteria,
|
51
|
+
}
|
52
|
+
)
|
53
|
+
if reasoning is not UNSET:
|
54
|
+
field_dict["reasoning"] = reasoning
|
55
|
+
if error is not UNSET:
|
56
|
+
field_dict["error"] = error
|
57
|
+
|
58
|
+
return field_dict
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
62
|
+
d = dict(src_dict)
|
63
|
+
verdict = PostApiScenarioEventsBodyType1ResultsType0Verdict(d.pop("verdict"))
|
64
|
+
|
65
|
+
met_criteria = cast(list[str], d.pop("metCriteria"))
|
66
|
+
|
67
|
+
unmet_criteria = cast(list[str], d.pop("unmetCriteria"))
|
68
|
+
|
69
|
+
reasoning = d.pop("reasoning", UNSET)
|
70
|
+
|
71
|
+
error = d.pop("error", UNSET)
|
72
|
+
|
73
|
+
post_api_scenario_events_body_type_1_results_type_0 = cls(
|
74
|
+
verdict=verdict,
|
75
|
+
met_criteria=met_criteria,
|
76
|
+
unmet_criteria=unmet_criteria,
|
77
|
+
reasoning=reasoning,
|
78
|
+
error=error,
|
79
|
+
)
|
80
|
+
|
81
|
+
post_api_scenario_events_body_type_1_results_type_0.additional_properties = d
|
82
|
+
return post_api_scenario_events_body_type_1_results_type_0
|
83
|
+
|
84
|
+
@property
|
85
|
+
def additional_keys(self) -> list[str]:
|
86
|
+
return list(self.additional_properties.keys())
|
87
|
+
|
88
|
+
def __getitem__(self, key: str) -> Any:
|
89
|
+
return self.additional_properties[key]
|
90
|
+
|
91
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
92
|
+
self.additional_properties[key] = value
|
93
|
+
|
94
|
+
def __delitem__(self, key: str) -> None:
|
95
|
+
del self.additional_properties[key]
|
96
|
+
|
97
|
+
def __contains__(self, key: str) -> bool:
|
98
|
+
return key in self.additional_properties
|
@@ -0,0 +1,13 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
|
4
|
+
class PostApiScenarioEventsBodyType1Status(str, Enum):
|
5
|
+
CANCELLED = "CANCELLED"
|
6
|
+
ERROR = "ERROR"
|
7
|
+
FAILED = "FAILED"
|
8
|
+
IN_PROGRESS = "IN_PROGRESS"
|
9
|
+
PENDING = "PENDING"
|
10
|
+
SUCCESS = "SUCCESS"
|
11
|
+
|
12
|
+
def __str__(self) -> str:
|
13
|
+
return str(self.value)
|