langwatch-scenario 0.6.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.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/METADATA +143 -41
- langwatch_scenario-0.7.1.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.1.dist-info}/WHEEL +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/entry_points.txt +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,172 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from ..models.post_api_prompts_response_200_messages_item import PostApiPromptsResponse200MessagesItem
|
9
|
+
from ..models.post_api_prompts_response_200_response_format_type_0 import (
|
10
|
+
PostApiPromptsResponse200ResponseFormatType0,
|
11
|
+
)
|
12
|
+
|
13
|
+
|
14
|
+
T = TypeVar("T", bound="PostApiPromptsResponse200")
|
15
|
+
|
16
|
+
|
17
|
+
@_attrs_define
|
18
|
+
class PostApiPromptsResponse200:
|
19
|
+
"""
|
20
|
+
Attributes:
|
21
|
+
id (str):
|
22
|
+
name (str):
|
23
|
+
updated_at (str):
|
24
|
+
version (float):
|
25
|
+
version_id (str):
|
26
|
+
version_created_at (str):
|
27
|
+
model (str):
|
28
|
+
prompt (str):
|
29
|
+
messages (list['PostApiPromptsResponse200MessagesItem']):
|
30
|
+
response_format (Union['PostApiPromptsResponse200ResponseFormatType0', None]):
|
31
|
+
"""
|
32
|
+
|
33
|
+
id: str
|
34
|
+
name: str
|
35
|
+
updated_at: str
|
36
|
+
version: float
|
37
|
+
version_id: str
|
38
|
+
version_created_at: str
|
39
|
+
model: str
|
40
|
+
prompt: str
|
41
|
+
messages: list["PostApiPromptsResponse200MessagesItem"]
|
42
|
+
response_format: Union["PostApiPromptsResponse200ResponseFormatType0", None]
|
43
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
44
|
+
|
45
|
+
def to_dict(self) -> dict[str, Any]:
|
46
|
+
from ..models.post_api_prompts_response_200_response_format_type_0 import (
|
47
|
+
PostApiPromptsResponse200ResponseFormatType0,
|
48
|
+
)
|
49
|
+
|
50
|
+
id = self.id
|
51
|
+
|
52
|
+
name = self.name
|
53
|
+
|
54
|
+
updated_at = self.updated_at
|
55
|
+
|
56
|
+
version = self.version
|
57
|
+
|
58
|
+
version_id = self.version_id
|
59
|
+
|
60
|
+
version_created_at = self.version_created_at
|
61
|
+
|
62
|
+
model = self.model
|
63
|
+
|
64
|
+
prompt = self.prompt
|
65
|
+
|
66
|
+
messages = []
|
67
|
+
for messages_item_data in self.messages:
|
68
|
+
messages_item = messages_item_data.to_dict()
|
69
|
+
messages.append(messages_item)
|
70
|
+
|
71
|
+
response_format: Union[None, dict[str, Any]]
|
72
|
+
if isinstance(self.response_format, PostApiPromptsResponse200ResponseFormatType0):
|
73
|
+
response_format = self.response_format.to_dict()
|
74
|
+
else:
|
75
|
+
response_format = self.response_format
|
76
|
+
|
77
|
+
field_dict: dict[str, Any] = {}
|
78
|
+
field_dict.update(self.additional_properties)
|
79
|
+
field_dict.update(
|
80
|
+
{
|
81
|
+
"id": id,
|
82
|
+
"name": name,
|
83
|
+
"updatedAt": updated_at,
|
84
|
+
"version": version,
|
85
|
+
"versionId": version_id,
|
86
|
+
"versionCreatedAt": version_created_at,
|
87
|
+
"model": model,
|
88
|
+
"prompt": prompt,
|
89
|
+
"messages": messages,
|
90
|
+
"response_format": response_format,
|
91
|
+
}
|
92
|
+
)
|
93
|
+
|
94
|
+
return field_dict
|
95
|
+
|
96
|
+
@classmethod
|
97
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
98
|
+
from ..models.post_api_prompts_response_200_messages_item import PostApiPromptsResponse200MessagesItem
|
99
|
+
from ..models.post_api_prompts_response_200_response_format_type_0 import (
|
100
|
+
PostApiPromptsResponse200ResponseFormatType0,
|
101
|
+
)
|
102
|
+
|
103
|
+
d = dict(src_dict)
|
104
|
+
id = d.pop("id")
|
105
|
+
|
106
|
+
name = d.pop("name")
|
107
|
+
|
108
|
+
updated_at = d.pop("updatedAt")
|
109
|
+
|
110
|
+
version = d.pop("version")
|
111
|
+
|
112
|
+
version_id = d.pop("versionId")
|
113
|
+
|
114
|
+
version_created_at = d.pop("versionCreatedAt")
|
115
|
+
|
116
|
+
model = d.pop("model")
|
117
|
+
|
118
|
+
prompt = d.pop("prompt")
|
119
|
+
|
120
|
+
messages = []
|
121
|
+
_messages = d.pop("messages")
|
122
|
+
for messages_item_data in _messages:
|
123
|
+
messages_item = PostApiPromptsResponse200MessagesItem.from_dict(messages_item_data)
|
124
|
+
|
125
|
+
messages.append(messages_item)
|
126
|
+
|
127
|
+
def _parse_response_format(data: object) -> Union["PostApiPromptsResponse200ResponseFormatType0", None]:
|
128
|
+
if data is None:
|
129
|
+
return data
|
130
|
+
try:
|
131
|
+
if not isinstance(data, dict):
|
132
|
+
raise TypeError()
|
133
|
+
response_format_type_0 = PostApiPromptsResponse200ResponseFormatType0.from_dict(data)
|
134
|
+
|
135
|
+
return response_format_type_0
|
136
|
+
except: # noqa: E722
|
137
|
+
pass
|
138
|
+
return cast(Union["PostApiPromptsResponse200ResponseFormatType0", None], data)
|
139
|
+
|
140
|
+
response_format = _parse_response_format(d.pop("response_format"))
|
141
|
+
|
142
|
+
post_api_prompts_response_200 = cls(
|
143
|
+
id=id,
|
144
|
+
name=name,
|
145
|
+
updated_at=updated_at,
|
146
|
+
version=version,
|
147
|
+
version_id=version_id,
|
148
|
+
version_created_at=version_created_at,
|
149
|
+
model=model,
|
150
|
+
prompt=prompt,
|
151
|
+
messages=messages,
|
152
|
+
response_format=response_format,
|
153
|
+
)
|
154
|
+
|
155
|
+
post_api_prompts_response_200.additional_properties = d
|
156
|
+
return post_api_prompts_response_200
|
157
|
+
|
158
|
+
@property
|
159
|
+
def additional_keys(self) -> list[str]:
|
160
|
+
return list(self.additional_properties.keys())
|
161
|
+
|
162
|
+
def __getitem__(self, key: str) -> Any:
|
163
|
+
return self.additional_properties[key]
|
164
|
+
|
165
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
166
|
+
self.additional_properties[key] = value
|
167
|
+
|
168
|
+
def __delitem__(self, key: str) -> None:
|
169
|
+
del self.additional_properties[key]
|
170
|
+
|
171
|
+
def __contains__(self, key: str) -> bool:
|
172
|
+
return key in self.additional_properties
|
@@ -0,0 +1,69 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_prompts_response_200_messages_item_role import PostApiPromptsResponse200MessagesItemRole
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PostApiPromptsResponse200MessagesItem")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PostApiPromptsResponse200MessagesItem:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
role (PostApiPromptsResponse200MessagesItemRole):
|
17
|
+
content (str):
|
18
|
+
"""
|
19
|
+
|
20
|
+
role: PostApiPromptsResponse200MessagesItemRole
|
21
|
+
content: str
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
role = self.role.value
|
26
|
+
|
27
|
+
content = self.content
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update(
|
32
|
+
{
|
33
|
+
"role": role,
|
34
|
+
"content": content,
|
35
|
+
}
|
36
|
+
)
|
37
|
+
|
38
|
+
return field_dict
|
39
|
+
|
40
|
+
@classmethod
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
42
|
+
d = dict(src_dict)
|
43
|
+
role = PostApiPromptsResponse200MessagesItemRole(d.pop("role"))
|
44
|
+
|
45
|
+
content = d.pop("content")
|
46
|
+
|
47
|
+
post_api_prompts_response_200_messages_item = cls(
|
48
|
+
role=role,
|
49
|
+
content=content,
|
50
|
+
)
|
51
|
+
|
52
|
+
post_api_prompts_response_200_messages_item.additional_properties = d
|
53
|
+
return post_api_prompts_response_200_messages_item
|
54
|
+
|
55
|
+
@property
|
56
|
+
def additional_keys(self) -> list[str]:
|
57
|
+
return list(self.additional_properties.keys())
|
58
|
+
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
60
|
+
return self.additional_properties[key]
|
61
|
+
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
63
|
+
self.additional_properties[key] = value
|
64
|
+
|
65
|
+
def __delitem__(self, key: str) -> None:
|
66
|
+
del self.additional_properties[key]
|
67
|
+
|
68
|
+
def __contains__(self, key: str) -> bool:
|
69
|
+
return key in self.additional_properties
|
@@ -0,0 +1,81 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_prompts_response_200_response_format_type_0_type import (
|
8
|
+
PostApiPromptsResponse200ResponseFormatType0Type,
|
9
|
+
)
|
10
|
+
|
11
|
+
if TYPE_CHECKING:
|
12
|
+
from ..models.post_api_prompts_response_200_response_format_type_0_json_schema import (
|
13
|
+
PostApiPromptsResponse200ResponseFormatType0JsonSchema,
|
14
|
+
)
|
15
|
+
|
16
|
+
|
17
|
+
T = TypeVar("T", bound="PostApiPromptsResponse200ResponseFormatType0")
|
18
|
+
|
19
|
+
|
20
|
+
@_attrs_define
|
21
|
+
class PostApiPromptsResponse200ResponseFormatType0:
|
22
|
+
"""
|
23
|
+
Attributes:
|
24
|
+
type_ (PostApiPromptsResponse200ResponseFormatType0Type):
|
25
|
+
json_schema (PostApiPromptsResponse200ResponseFormatType0JsonSchema):
|
26
|
+
"""
|
27
|
+
|
28
|
+
type_: PostApiPromptsResponse200ResponseFormatType0Type
|
29
|
+
json_schema: "PostApiPromptsResponse200ResponseFormatType0JsonSchema"
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
|
+
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
33
|
+
type_ = self.type_.value
|
34
|
+
|
35
|
+
json_schema = self.json_schema.to_dict()
|
36
|
+
|
37
|
+
field_dict: dict[str, Any] = {}
|
38
|
+
field_dict.update(self.additional_properties)
|
39
|
+
field_dict.update(
|
40
|
+
{
|
41
|
+
"type": type_,
|
42
|
+
"json_schema": json_schema,
|
43
|
+
}
|
44
|
+
)
|
45
|
+
|
46
|
+
return field_dict
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
50
|
+
from ..models.post_api_prompts_response_200_response_format_type_0_json_schema import (
|
51
|
+
PostApiPromptsResponse200ResponseFormatType0JsonSchema,
|
52
|
+
)
|
53
|
+
|
54
|
+
d = dict(src_dict)
|
55
|
+
type_ = PostApiPromptsResponse200ResponseFormatType0Type(d.pop("type"))
|
56
|
+
|
57
|
+
json_schema = PostApiPromptsResponse200ResponseFormatType0JsonSchema.from_dict(d.pop("json_schema"))
|
58
|
+
|
59
|
+
post_api_prompts_response_200_response_format_type_0 = cls(
|
60
|
+
type_=type_,
|
61
|
+
json_schema=json_schema,
|
62
|
+
)
|
63
|
+
|
64
|
+
post_api_prompts_response_200_response_format_type_0.additional_properties = d
|
65
|
+
return post_api_prompts_response_200_response_format_type_0
|
66
|
+
|
67
|
+
@property
|
68
|
+
def additional_keys(self) -> list[str]:
|
69
|
+
return list(self.additional_properties.keys())
|
70
|
+
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
72
|
+
return self.additional_properties[key]
|
73
|
+
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
75
|
+
self.additional_properties[key] = value
|
76
|
+
|
77
|
+
def __delitem__(self, key: str) -> None:
|
78
|
+
del self.additional_properties[key]
|
79
|
+
|
80
|
+
def __contains__(self, key: str) -> bool:
|
81
|
+
return key in self.additional_properties
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from ..models.post_api_prompts_response_200_response_format_type_0_json_schema_schema import (
|
9
|
+
PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema,
|
10
|
+
)
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="PostApiPromptsResponse200ResponseFormatType0JsonSchema")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class PostApiPromptsResponse200ResponseFormatType0JsonSchema:
|
18
|
+
"""
|
19
|
+
Attributes:
|
20
|
+
name (str):
|
21
|
+
schema (PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema):
|
22
|
+
"""
|
23
|
+
|
24
|
+
name: str
|
25
|
+
schema: "PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema"
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
27
|
+
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
29
|
+
name = self.name
|
30
|
+
|
31
|
+
schema = self.schema.to_dict()
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update(
|
36
|
+
{
|
37
|
+
"name": name,
|
38
|
+
"schema": schema,
|
39
|
+
}
|
40
|
+
)
|
41
|
+
|
42
|
+
return field_dict
|
43
|
+
|
44
|
+
@classmethod
|
45
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
46
|
+
from ..models.post_api_prompts_response_200_response_format_type_0_json_schema_schema import (
|
47
|
+
PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema,
|
48
|
+
)
|
49
|
+
|
50
|
+
d = dict(src_dict)
|
51
|
+
name = d.pop("name")
|
52
|
+
|
53
|
+
schema = PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema.from_dict(d.pop("schema"))
|
54
|
+
|
55
|
+
post_api_prompts_response_200_response_format_type_0_json_schema = cls(
|
56
|
+
name=name,
|
57
|
+
schema=schema,
|
58
|
+
)
|
59
|
+
|
60
|
+
post_api_prompts_response_200_response_format_type_0_json_schema.additional_properties = d
|
61
|
+
return post_api_prompts_response_200_response_format_type_0_json_schema
|
62
|
+
|
63
|
+
@property
|
64
|
+
def additional_keys(self) -> list[str]:
|
65
|
+
return list(self.additional_properties.keys())
|
66
|
+
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
68
|
+
return self.additional_properties[key]
|
69
|
+
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
71
|
+
self.additional_properties[key] = value
|
72
|
+
|
73
|
+
def __delitem__(self, key: str) -> None:
|
74
|
+
del self.additional_properties[key]
|
75
|
+
|
76
|
+
def __contains__(self, key: str) -> bool:
|
77
|
+
return key in self.additional_properties
|
@@ -0,0 +1,44 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
T = TypeVar("T", bound="PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema:
|
12
|
+
""" """
|
13
|
+
|
14
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
15
|
+
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
17
|
+
field_dict: dict[str, Any] = {}
|
18
|
+
field_dict.update(self.additional_properties)
|
19
|
+
|
20
|
+
return field_dict
|
21
|
+
|
22
|
+
@classmethod
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
24
|
+
d = dict(src_dict)
|
25
|
+
post_api_prompts_response_200_response_format_type_0_json_schema_schema = cls()
|
26
|
+
|
27
|
+
post_api_prompts_response_200_response_format_type_0_json_schema_schema.additional_properties = d
|
28
|
+
return post_api_prompts_response_200_response_format_type_0_json_schema_schema
|
29
|
+
|
30
|
+
@property
|
31
|
+
def additional_keys(self) -> list[str]:
|
32
|
+
return list(self.additional_properties.keys())
|
33
|
+
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
35
|
+
return self.additional_properties[key]
|
36
|
+
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
38
|
+
self.additional_properties[key] = value
|
39
|
+
|
40
|
+
def __delitem__(self, key: str) -> None:
|
41
|
+
del self.additional_properties[key]
|
42
|
+
|
43
|
+
def __contains__(self, key: str) -> bool:
|
44
|
+
return key in self.additional_properties
|
@@ -0,0 +1,61 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_prompts_response_400_error import PostApiPromptsResponse400Error
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PostApiPromptsResponse400")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PostApiPromptsResponse400:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
error (PostApiPromptsResponse400Error):
|
17
|
+
"""
|
18
|
+
|
19
|
+
error: PostApiPromptsResponse400Error
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
+
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
23
|
+
error = self.error.value
|
24
|
+
|
25
|
+
field_dict: dict[str, Any] = {}
|
26
|
+
field_dict.update(self.additional_properties)
|
27
|
+
field_dict.update(
|
28
|
+
{
|
29
|
+
"error": error,
|
30
|
+
}
|
31
|
+
)
|
32
|
+
|
33
|
+
return field_dict
|
34
|
+
|
35
|
+
@classmethod
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
37
|
+
d = dict(src_dict)
|
38
|
+
error = PostApiPromptsResponse400Error(d.pop("error"))
|
39
|
+
|
40
|
+
post_api_prompts_response_400 = cls(
|
41
|
+
error=error,
|
42
|
+
)
|
43
|
+
|
44
|
+
post_api_prompts_response_400.additional_properties = d
|
45
|
+
return post_api_prompts_response_400
|
46
|
+
|
47
|
+
@property
|
48
|
+
def additional_keys(self) -> list[str]:
|
49
|
+
return list(self.additional_properties.keys())
|
50
|
+
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
52
|
+
return self.additional_properties[key]
|
53
|
+
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
55
|
+
self.additional_properties[key] = value
|
56
|
+
|
57
|
+
def __delitem__(self, key: str) -> None:
|
58
|
+
del self.additional_properties[key]
|
59
|
+
|
60
|
+
def __contains__(self, key: str) -> bool:
|
61
|
+
return key in self.additional_properties
|
@@ -0,0 +1,61 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_prompts_response_401_error import PostApiPromptsResponse401Error
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PostApiPromptsResponse401")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PostApiPromptsResponse401:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
error (PostApiPromptsResponse401Error):
|
17
|
+
"""
|
18
|
+
|
19
|
+
error: PostApiPromptsResponse401Error
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
+
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
23
|
+
error = self.error.value
|
24
|
+
|
25
|
+
field_dict: dict[str, Any] = {}
|
26
|
+
field_dict.update(self.additional_properties)
|
27
|
+
field_dict.update(
|
28
|
+
{
|
29
|
+
"error": error,
|
30
|
+
}
|
31
|
+
)
|
32
|
+
|
33
|
+
return field_dict
|
34
|
+
|
35
|
+
@classmethod
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
37
|
+
d = dict(src_dict)
|
38
|
+
error = PostApiPromptsResponse401Error(d.pop("error"))
|
39
|
+
|
40
|
+
post_api_prompts_response_401 = cls(
|
41
|
+
error=error,
|
42
|
+
)
|
43
|
+
|
44
|
+
post_api_prompts_response_401.additional_properties = d
|
45
|
+
return post_api_prompts_response_401
|
46
|
+
|
47
|
+
@property
|
48
|
+
def additional_keys(self) -> list[str]:
|
49
|
+
return list(self.additional_properties.keys())
|
50
|
+
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
52
|
+
return self.additional_properties[key]
|
53
|
+
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
55
|
+
self.additional_properties[key] = value
|
56
|
+
|
57
|
+
def __delitem__(self, key: str) -> None:
|
58
|
+
del self.additional_properties[key]
|
59
|
+
|
60
|
+
def __contains__(self, key: str) -> bool:
|
61
|
+
return key in self.additional_properties
|
@@ -0,0 +1,59 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
T = TypeVar("T", bound="PostApiPromptsResponse500")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class PostApiPromptsResponse500:
|
12
|
+
"""
|
13
|
+
Attributes:
|
14
|
+
error (str):
|
15
|
+
"""
|
16
|
+
|
17
|
+
error: str
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
19
|
+
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
21
|
+
error = self.error
|
22
|
+
|
23
|
+
field_dict: dict[str, Any] = {}
|
24
|
+
field_dict.update(self.additional_properties)
|
25
|
+
field_dict.update(
|
26
|
+
{
|
27
|
+
"error": error,
|
28
|
+
}
|
29
|
+
)
|
30
|
+
|
31
|
+
return field_dict
|
32
|
+
|
33
|
+
@classmethod
|
34
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
35
|
+
d = dict(src_dict)
|
36
|
+
error = d.pop("error")
|
37
|
+
|
38
|
+
post_api_prompts_response_500 = cls(
|
39
|
+
error=error,
|
40
|
+
)
|
41
|
+
|
42
|
+
post_api_prompts_response_500.additional_properties = d
|
43
|
+
return post_api_prompts_response_500
|
44
|
+
|
45
|
+
@property
|
46
|
+
def additional_keys(self) -> list[str]:
|
47
|
+
return list(self.additional_properties.keys())
|
48
|
+
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
50
|
+
return self.additional_properties[key]
|
51
|
+
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
53
|
+
self.additional_properties[key] = value
|
54
|
+
|
55
|
+
def __delitem__(self, key: str) -> None:
|
56
|
+
del self.additional_properties[key]
|
57
|
+
|
58
|
+
def __contains__(self, key: str) -> bool:
|
59
|
+
return key in self.additional_properties
|