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,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="GetApiPromptsResponse200ItemResponseFormatType0JsonSchemaSchema")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class GetApiPromptsResponse200ItemResponseFormatType0JsonSchemaSchema:
|
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
|
+
get_api_prompts_response_200_item_response_format_type_0_json_schema_schema = cls()
|
26
|
+
|
27
|
+
get_api_prompts_response_200_item_response_format_type_0_json_schema_schema.additional_properties = d
|
28
|
+
return get_api_prompts_response_200_item_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.get_api_prompts_response_400_error import GetApiPromptsResponse400Error
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="GetApiPromptsResponse400")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiPromptsResponse400:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
error (GetApiPromptsResponse400Error):
|
17
|
+
"""
|
18
|
+
|
19
|
+
error: GetApiPromptsResponse400Error
|
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 = GetApiPromptsResponse400Error(d.pop("error"))
|
39
|
+
|
40
|
+
get_api_prompts_response_400 = cls(
|
41
|
+
error=error,
|
42
|
+
)
|
43
|
+
|
44
|
+
get_api_prompts_response_400.additional_properties = d
|
45
|
+
return get_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.get_api_prompts_response_401_error import GetApiPromptsResponse401Error
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="GetApiPromptsResponse401")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiPromptsResponse401:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
error (GetApiPromptsResponse401Error):
|
17
|
+
"""
|
18
|
+
|
19
|
+
error: GetApiPromptsResponse401Error
|
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 = GetApiPromptsResponse401Error(d.pop("error"))
|
39
|
+
|
40
|
+
get_api_prompts_response_401 = cls(
|
41
|
+
error=error,
|
42
|
+
)
|
43
|
+
|
44
|
+
get_api_prompts_response_401.additional_properties = d
|
45
|
+
return get_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="GetApiPromptsResponse500")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class GetApiPromptsResponse500:
|
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
|
+
get_api_prompts_response_500 = cls(
|
39
|
+
error=error,
|
40
|
+
)
|
41
|
+
|
42
|
+
get_api_prompts_response_500.additional_properties = d
|
43
|
+
return get_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
|
@@ -0,0 +1,249 @@
|
|
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
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from ..models.get_api_trace_id_response_200_error_type_0 import GetApiTraceIdResponse200ErrorType0
|
11
|
+
from ..models.get_api_trace_id_response_200_evaluations_item import GetApiTraceIdResponse200EvaluationsItem
|
12
|
+
from ..models.get_api_trace_id_response_200_input import GetApiTraceIdResponse200Input
|
13
|
+
from ..models.get_api_trace_id_response_200_metadata import GetApiTraceIdResponse200Metadata
|
14
|
+
from ..models.get_api_trace_id_response_200_metrics import GetApiTraceIdResponse200Metrics
|
15
|
+
from ..models.get_api_trace_id_response_200_output import GetApiTraceIdResponse200Output
|
16
|
+
from ..models.get_api_trace_id_response_200_spans_item import GetApiTraceIdResponse200SpansItem
|
17
|
+
from ..models.get_api_trace_id_response_200_timestamps import GetApiTraceIdResponse200Timestamps
|
18
|
+
|
19
|
+
|
20
|
+
T = TypeVar("T", bound="GetApiTraceIdResponse200")
|
21
|
+
|
22
|
+
|
23
|
+
@_attrs_define
|
24
|
+
class GetApiTraceIdResponse200:
|
25
|
+
"""
|
26
|
+
Attributes:
|
27
|
+
trace_id (Union[Unset, str]): Example: trace_BKZL_X0TKSD4oa1aBJTc_.
|
28
|
+
project_id (Union[Unset, str]): Example: KAXYxPR8MUgTcP8CF193y.
|
29
|
+
metadata (Union[Unset, GetApiTraceIdResponse200Metadata]):
|
30
|
+
timestamps (Union[Unset, GetApiTraceIdResponse200Timestamps]):
|
31
|
+
input_ (Union[Unset, GetApiTraceIdResponse200Input]):
|
32
|
+
output (Union[Unset, GetApiTraceIdResponse200Output]):
|
33
|
+
metrics (Union[Unset, GetApiTraceIdResponse200Metrics]):
|
34
|
+
error (Union['GetApiTraceIdResponse200ErrorType0', None, Unset]):
|
35
|
+
indexing_md5s (Union[Unset, list[str]]): Example: ['cccd21e0b70c706034dfd9f7772816a3'].
|
36
|
+
spans (Union[Unset, list['GetApiTraceIdResponse200SpansItem']]):
|
37
|
+
evaluations (Union[Unset, list['GetApiTraceIdResponse200EvaluationsItem']]):
|
38
|
+
"""
|
39
|
+
|
40
|
+
trace_id: Union[Unset, str] = UNSET
|
41
|
+
project_id: Union[Unset, str] = UNSET
|
42
|
+
metadata: Union[Unset, "GetApiTraceIdResponse200Metadata"] = UNSET
|
43
|
+
timestamps: Union[Unset, "GetApiTraceIdResponse200Timestamps"] = UNSET
|
44
|
+
input_: Union[Unset, "GetApiTraceIdResponse200Input"] = UNSET
|
45
|
+
output: Union[Unset, "GetApiTraceIdResponse200Output"] = UNSET
|
46
|
+
metrics: Union[Unset, "GetApiTraceIdResponse200Metrics"] = UNSET
|
47
|
+
error: Union["GetApiTraceIdResponse200ErrorType0", None, Unset] = UNSET
|
48
|
+
indexing_md5s: Union[Unset, list[str]] = UNSET
|
49
|
+
spans: Union[Unset, list["GetApiTraceIdResponse200SpansItem"]] = UNSET
|
50
|
+
evaluations: Union[Unset, list["GetApiTraceIdResponse200EvaluationsItem"]] = UNSET
|
51
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
52
|
+
|
53
|
+
def to_dict(self) -> dict[str, Any]:
|
54
|
+
from ..models.get_api_trace_id_response_200_error_type_0 import GetApiTraceIdResponse200ErrorType0
|
55
|
+
|
56
|
+
trace_id = self.trace_id
|
57
|
+
|
58
|
+
project_id = self.project_id
|
59
|
+
|
60
|
+
metadata: Union[Unset, dict[str, Any]] = UNSET
|
61
|
+
if not isinstance(self.metadata, Unset):
|
62
|
+
metadata = self.metadata.to_dict()
|
63
|
+
|
64
|
+
timestamps: Union[Unset, dict[str, Any]] = UNSET
|
65
|
+
if not isinstance(self.timestamps, Unset):
|
66
|
+
timestamps = self.timestamps.to_dict()
|
67
|
+
|
68
|
+
input_: Union[Unset, dict[str, Any]] = UNSET
|
69
|
+
if not isinstance(self.input_, Unset):
|
70
|
+
input_ = self.input_.to_dict()
|
71
|
+
|
72
|
+
output: Union[Unset, dict[str, Any]] = UNSET
|
73
|
+
if not isinstance(self.output, Unset):
|
74
|
+
output = self.output.to_dict()
|
75
|
+
|
76
|
+
metrics: Union[Unset, dict[str, Any]] = UNSET
|
77
|
+
if not isinstance(self.metrics, Unset):
|
78
|
+
metrics = self.metrics.to_dict()
|
79
|
+
|
80
|
+
error: Union[None, Unset, dict[str, Any]]
|
81
|
+
if isinstance(self.error, Unset):
|
82
|
+
error = UNSET
|
83
|
+
elif isinstance(self.error, GetApiTraceIdResponse200ErrorType0):
|
84
|
+
error = self.error.to_dict()
|
85
|
+
else:
|
86
|
+
error = self.error
|
87
|
+
|
88
|
+
indexing_md5s: Union[Unset, list[str]] = UNSET
|
89
|
+
if not isinstance(self.indexing_md5s, Unset):
|
90
|
+
indexing_md5s = self.indexing_md5s
|
91
|
+
|
92
|
+
spans: Union[Unset, list[dict[str, Any]]] = UNSET
|
93
|
+
if not isinstance(self.spans, Unset):
|
94
|
+
spans = []
|
95
|
+
for spans_item_data in self.spans:
|
96
|
+
spans_item = spans_item_data.to_dict()
|
97
|
+
spans.append(spans_item)
|
98
|
+
|
99
|
+
evaluations: Union[Unset, list[dict[str, Any]]] = UNSET
|
100
|
+
if not isinstance(self.evaluations, Unset):
|
101
|
+
evaluations = []
|
102
|
+
for evaluations_item_data in self.evaluations:
|
103
|
+
evaluations_item = evaluations_item_data.to_dict()
|
104
|
+
evaluations.append(evaluations_item)
|
105
|
+
|
106
|
+
field_dict: dict[str, Any] = {}
|
107
|
+
field_dict.update(self.additional_properties)
|
108
|
+
field_dict.update({})
|
109
|
+
if trace_id is not UNSET:
|
110
|
+
field_dict["trace_id"] = trace_id
|
111
|
+
if project_id is not UNSET:
|
112
|
+
field_dict["project_id"] = project_id
|
113
|
+
if metadata is not UNSET:
|
114
|
+
field_dict["metadata"] = metadata
|
115
|
+
if timestamps is not UNSET:
|
116
|
+
field_dict["timestamps"] = timestamps
|
117
|
+
if input_ is not UNSET:
|
118
|
+
field_dict["input"] = input_
|
119
|
+
if output is not UNSET:
|
120
|
+
field_dict["output"] = output
|
121
|
+
if metrics is not UNSET:
|
122
|
+
field_dict["metrics"] = metrics
|
123
|
+
if error is not UNSET:
|
124
|
+
field_dict["error"] = error
|
125
|
+
if indexing_md5s is not UNSET:
|
126
|
+
field_dict["indexing_md5s"] = indexing_md5s
|
127
|
+
if spans is not UNSET:
|
128
|
+
field_dict["spans"] = spans
|
129
|
+
if evaluations is not UNSET:
|
130
|
+
field_dict["evaluations"] = evaluations
|
131
|
+
|
132
|
+
return field_dict
|
133
|
+
|
134
|
+
@classmethod
|
135
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
136
|
+
from ..models.get_api_trace_id_response_200_error_type_0 import GetApiTraceIdResponse200ErrorType0
|
137
|
+
from ..models.get_api_trace_id_response_200_evaluations_item import GetApiTraceIdResponse200EvaluationsItem
|
138
|
+
from ..models.get_api_trace_id_response_200_input import GetApiTraceIdResponse200Input
|
139
|
+
from ..models.get_api_trace_id_response_200_metadata import GetApiTraceIdResponse200Metadata
|
140
|
+
from ..models.get_api_trace_id_response_200_metrics import GetApiTraceIdResponse200Metrics
|
141
|
+
from ..models.get_api_trace_id_response_200_output import GetApiTraceIdResponse200Output
|
142
|
+
from ..models.get_api_trace_id_response_200_spans_item import GetApiTraceIdResponse200SpansItem
|
143
|
+
from ..models.get_api_trace_id_response_200_timestamps import GetApiTraceIdResponse200Timestamps
|
144
|
+
|
145
|
+
d = dict(src_dict)
|
146
|
+
trace_id = d.pop("trace_id", UNSET)
|
147
|
+
|
148
|
+
project_id = d.pop("project_id", UNSET)
|
149
|
+
|
150
|
+
_metadata = d.pop("metadata", UNSET)
|
151
|
+
metadata: Union[Unset, GetApiTraceIdResponse200Metadata]
|
152
|
+
if isinstance(_metadata, Unset):
|
153
|
+
metadata = UNSET
|
154
|
+
else:
|
155
|
+
metadata = GetApiTraceIdResponse200Metadata.from_dict(_metadata)
|
156
|
+
|
157
|
+
_timestamps = d.pop("timestamps", UNSET)
|
158
|
+
timestamps: Union[Unset, GetApiTraceIdResponse200Timestamps]
|
159
|
+
if isinstance(_timestamps, Unset):
|
160
|
+
timestamps = UNSET
|
161
|
+
else:
|
162
|
+
timestamps = GetApiTraceIdResponse200Timestamps.from_dict(_timestamps)
|
163
|
+
|
164
|
+
_input_ = d.pop("input", UNSET)
|
165
|
+
input_: Union[Unset, GetApiTraceIdResponse200Input]
|
166
|
+
if isinstance(_input_, Unset):
|
167
|
+
input_ = UNSET
|
168
|
+
else:
|
169
|
+
input_ = GetApiTraceIdResponse200Input.from_dict(_input_)
|
170
|
+
|
171
|
+
_output = d.pop("output", UNSET)
|
172
|
+
output: Union[Unset, GetApiTraceIdResponse200Output]
|
173
|
+
if isinstance(_output, Unset):
|
174
|
+
output = UNSET
|
175
|
+
else:
|
176
|
+
output = GetApiTraceIdResponse200Output.from_dict(_output)
|
177
|
+
|
178
|
+
_metrics = d.pop("metrics", UNSET)
|
179
|
+
metrics: Union[Unset, GetApiTraceIdResponse200Metrics]
|
180
|
+
if isinstance(_metrics, Unset):
|
181
|
+
metrics = UNSET
|
182
|
+
else:
|
183
|
+
metrics = GetApiTraceIdResponse200Metrics.from_dict(_metrics)
|
184
|
+
|
185
|
+
def _parse_error(data: object) -> Union["GetApiTraceIdResponse200ErrorType0", None, Unset]:
|
186
|
+
if data is None:
|
187
|
+
return data
|
188
|
+
if isinstance(data, Unset):
|
189
|
+
return data
|
190
|
+
try:
|
191
|
+
if not isinstance(data, dict):
|
192
|
+
raise TypeError()
|
193
|
+
error_type_0 = GetApiTraceIdResponse200ErrorType0.from_dict(data)
|
194
|
+
|
195
|
+
return error_type_0
|
196
|
+
except: # noqa: E722
|
197
|
+
pass
|
198
|
+
return cast(Union["GetApiTraceIdResponse200ErrorType0", None, Unset], data)
|
199
|
+
|
200
|
+
error = _parse_error(d.pop("error", UNSET))
|
201
|
+
|
202
|
+
indexing_md5s = cast(list[str], d.pop("indexing_md5s", UNSET))
|
203
|
+
|
204
|
+
spans = []
|
205
|
+
_spans = d.pop("spans", UNSET)
|
206
|
+
for spans_item_data in _spans or []:
|
207
|
+
spans_item = GetApiTraceIdResponse200SpansItem.from_dict(spans_item_data)
|
208
|
+
|
209
|
+
spans.append(spans_item)
|
210
|
+
|
211
|
+
evaluations = []
|
212
|
+
_evaluations = d.pop("evaluations", UNSET)
|
213
|
+
for evaluations_item_data in _evaluations or []:
|
214
|
+
evaluations_item = GetApiTraceIdResponse200EvaluationsItem.from_dict(evaluations_item_data)
|
215
|
+
|
216
|
+
evaluations.append(evaluations_item)
|
217
|
+
|
218
|
+
get_api_trace_id_response_200 = cls(
|
219
|
+
trace_id=trace_id,
|
220
|
+
project_id=project_id,
|
221
|
+
metadata=metadata,
|
222
|
+
timestamps=timestamps,
|
223
|
+
input_=input_,
|
224
|
+
output=output,
|
225
|
+
metrics=metrics,
|
226
|
+
error=error,
|
227
|
+
indexing_md5s=indexing_md5s,
|
228
|
+
spans=spans,
|
229
|
+
evaluations=evaluations,
|
230
|
+
)
|
231
|
+
|
232
|
+
get_api_trace_id_response_200.additional_properties = d
|
233
|
+
return get_api_trace_id_response_200
|
234
|
+
|
235
|
+
@property
|
236
|
+
def additional_keys(self) -> list[str]:
|
237
|
+
return list(self.additional_properties.keys())
|
238
|
+
|
239
|
+
def __getitem__(self, key: str) -> Any:
|
240
|
+
return self.additional_properties[key]
|
241
|
+
|
242
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
243
|
+
self.additional_properties[key] = value
|
244
|
+
|
245
|
+
def __delitem__(self, key: str) -> None:
|
246
|
+
del self.additional_properties[key]
|
247
|
+
|
248
|
+
def __contains__(self, key: str) -> bool:
|
249
|
+
return key in self.additional_properties
|
@@ -0,0 +1,79 @@
|
|
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 ..types import UNSET, Unset
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="GetApiTraceIdResponse200ErrorType0")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiTraceIdResponse200ErrorType0:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
stacktrace (Union[Unset, list[str]]):
|
17
|
+
message (Union[Unset, str]):
|
18
|
+
has_error (Union[Unset, bool]):
|
19
|
+
"""
|
20
|
+
|
21
|
+
stacktrace: Union[Unset, list[str]] = UNSET
|
22
|
+
message: Union[Unset, str] = UNSET
|
23
|
+
has_error: Union[Unset, bool] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
stacktrace: Union[Unset, list[str]] = UNSET
|
28
|
+
if not isinstance(self.stacktrace, Unset):
|
29
|
+
stacktrace = self.stacktrace
|
30
|
+
|
31
|
+
message = self.message
|
32
|
+
|
33
|
+
has_error = self.has_error
|
34
|
+
|
35
|
+
field_dict: dict[str, Any] = {}
|
36
|
+
field_dict.update(self.additional_properties)
|
37
|
+
field_dict.update({})
|
38
|
+
if stacktrace is not UNSET:
|
39
|
+
field_dict["stacktrace"] = stacktrace
|
40
|
+
if message is not UNSET:
|
41
|
+
field_dict["message"] = message
|
42
|
+
if has_error is not UNSET:
|
43
|
+
field_dict["has_error"] = has_error
|
44
|
+
|
45
|
+
return field_dict
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
49
|
+
d = dict(src_dict)
|
50
|
+
stacktrace = cast(list[str], d.pop("stacktrace", UNSET))
|
51
|
+
|
52
|
+
message = d.pop("message", UNSET)
|
53
|
+
|
54
|
+
has_error = d.pop("has_error", UNSET)
|
55
|
+
|
56
|
+
get_api_trace_id_response_200_error_type_0 = cls(
|
57
|
+
stacktrace=stacktrace,
|
58
|
+
message=message,
|
59
|
+
has_error=has_error,
|
60
|
+
)
|
61
|
+
|
62
|
+
get_api_trace_id_response_200_error_type_0.additional_properties = d
|
63
|
+
return get_api_trace_id_response_200_error_type_0
|
64
|
+
|
65
|
+
@property
|
66
|
+
def additional_keys(self) -> list[str]:
|
67
|
+
return list(self.additional_properties.keys())
|
68
|
+
|
69
|
+
def __getitem__(self, key: str) -> Any:
|
70
|
+
return self.additional_properties[key]
|
71
|
+
|
72
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
73
|
+
self.additional_properties[key] = value
|
74
|
+
|
75
|
+
def __delitem__(self, key: str) -> None:
|
76
|
+
del self.additional_properties[key]
|
77
|
+
|
78
|
+
def __contains__(self, key: str) -> bool:
|
79
|
+
return key in self.additional_properties
|