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,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.put_api_prompts_by_id_response_400_error import PutApiPromptsByIdResponse400Error
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PutApiPromptsByIdResponse400")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PutApiPromptsByIdResponse400:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
error (PutApiPromptsByIdResponse400Error):
|
17
|
+
"""
|
18
|
+
|
19
|
+
error: PutApiPromptsByIdResponse400Error
|
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 = PutApiPromptsByIdResponse400Error(d.pop("error"))
|
39
|
+
|
40
|
+
put_api_prompts_by_id_response_400 = cls(
|
41
|
+
error=error,
|
42
|
+
)
|
43
|
+
|
44
|
+
put_api_prompts_by_id_response_400.additional_properties = d
|
45
|
+
return put_api_prompts_by_id_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.put_api_prompts_by_id_response_401_error import PutApiPromptsByIdResponse401Error
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PutApiPromptsByIdResponse401")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PutApiPromptsByIdResponse401:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
error (PutApiPromptsByIdResponse401Error):
|
17
|
+
"""
|
18
|
+
|
19
|
+
error: PutApiPromptsByIdResponse401Error
|
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 = PutApiPromptsByIdResponse401Error(d.pop("error"))
|
39
|
+
|
40
|
+
put_api_prompts_by_id_response_401 = cls(
|
41
|
+
error=error,
|
42
|
+
)
|
43
|
+
|
44
|
+
put_api_prompts_by_id_response_401.additional_properties = d
|
45
|
+
return put_api_prompts_by_id_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="PutApiPromptsByIdResponse404")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class PutApiPromptsByIdResponse404:
|
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
|
+
put_api_prompts_by_id_response_404 = cls(
|
39
|
+
error=error,
|
40
|
+
)
|
41
|
+
|
42
|
+
put_api_prompts_by_id_response_404.additional_properties = d
|
43
|
+
return put_api_prompts_by_id_response_404
|
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,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="PutApiPromptsByIdResponse500")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class PutApiPromptsByIdResponse500:
|
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
|
+
put_api_prompts_by_id_response_500 = cls(
|
39
|
+
error=error,
|
40
|
+
)
|
41
|
+
|
42
|
+
put_api_prompts_by_id_response_500.additional_properties = d
|
43
|
+
return put_api_prompts_by_id_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,133 @@
|
|
1
|
+
import datetime
|
2
|
+
from collections.abc import Mapping
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
4
|
+
|
5
|
+
from attrs import define as _attrs_define
|
6
|
+
from attrs import field as _attrs_field
|
7
|
+
from dateutil.parser import isoparse
|
8
|
+
|
9
|
+
from ..types import UNSET, Unset
|
10
|
+
|
11
|
+
if TYPE_CHECKING:
|
12
|
+
from ..models.search_request_filters import SearchRequestFilters
|
13
|
+
|
14
|
+
|
15
|
+
T = TypeVar("T", bound="SearchRequest")
|
16
|
+
|
17
|
+
|
18
|
+
@_attrs_define
|
19
|
+
class SearchRequest:
|
20
|
+
"""
|
21
|
+
Attributes:
|
22
|
+
query (Union[Unset, str]):
|
23
|
+
start_date (Union[Unset, datetime.datetime]):
|
24
|
+
end_date (Union[Unset, datetime.datetime]):
|
25
|
+
page_size (Union[Unset, int]): Example: 1000.
|
26
|
+
scroll_id (Union[Unset, str]): Example: 123.
|
27
|
+
filters (Union[Unset, SearchRequestFilters]):
|
28
|
+
"""
|
29
|
+
|
30
|
+
query: Union[Unset, str] = UNSET
|
31
|
+
start_date: Union[Unset, datetime.datetime] = UNSET
|
32
|
+
end_date: Union[Unset, datetime.datetime] = UNSET
|
33
|
+
page_size: Union[Unset, int] = UNSET
|
34
|
+
scroll_id: Union[Unset, str] = UNSET
|
35
|
+
filters: Union[Unset, "SearchRequestFilters"] = UNSET
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
37
|
+
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
39
|
+
query = self.query
|
40
|
+
|
41
|
+
start_date: Union[Unset, str] = UNSET
|
42
|
+
if not isinstance(self.start_date, Unset):
|
43
|
+
start_date = self.start_date.isoformat()
|
44
|
+
|
45
|
+
end_date: Union[Unset, str] = UNSET
|
46
|
+
if not isinstance(self.end_date, Unset):
|
47
|
+
end_date = self.end_date.isoformat()
|
48
|
+
|
49
|
+
page_size = self.page_size
|
50
|
+
|
51
|
+
scroll_id = self.scroll_id
|
52
|
+
|
53
|
+
filters: Union[Unset, dict[str, Any]] = UNSET
|
54
|
+
if not isinstance(self.filters, Unset):
|
55
|
+
filters = self.filters.to_dict()
|
56
|
+
|
57
|
+
field_dict: dict[str, Any] = {}
|
58
|
+
field_dict.update(self.additional_properties)
|
59
|
+
field_dict.update({})
|
60
|
+
if query is not UNSET:
|
61
|
+
field_dict["query"] = query
|
62
|
+
if start_date is not UNSET:
|
63
|
+
field_dict["startDate"] = start_date
|
64
|
+
if end_date is not UNSET:
|
65
|
+
field_dict["endDate"] = end_date
|
66
|
+
if page_size is not UNSET:
|
67
|
+
field_dict["pageSize"] = page_size
|
68
|
+
if scroll_id is not UNSET:
|
69
|
+
field_dict["scrollId"] = scroll_id
|
70
|
+
if filters is not UNSET:
|
71
|
+
field_dict["filters"] = filters
|
72
|
+
|
73
|
+
return field_dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
77
|
+
from ..models.search_request_filters import SearchRequestFilters
|
78
|
+
|
79
|
+
d = dict(src_dict)
|
80
|
+
query = d.pop("query", UNSET)
|
81
|
+
|
82
|
+
_start_date = d.pop("startDate", UNSET)
|
83
|
+
start_date: Union[Unset, datetime.datetime]
|
84
|
+
if isinstance(_start_date, Unset):
|
85
|
+
start_date = UNSET
|
86
|
+
else:
|
87
|
+
start_date = isoparse(_start_date)
|
88
|
+
|
89
|
+
_end_date = d.pop("endDate", UNSET)
|
90
|
+
end_date: Union[Unset, datetime.datetime]
|
91
|
+
if isinstance(_end_date, Unset):
|
92
|
+
end_date = UNSET
|
93
|
+
else:
|
94
|
+
end_date = isoparse(_end_date)
|
95
|
+
|
96
|
+
page_size = d.pop("pageSize", UNSET)
|
97
|
+
|
98
|
+
scroll_id = d.pop("scrollId", UNSET)
|
99
|
+
|
100
|
+
_filters = d.pop("filters", UNSET)
|
101
|
+
filters: Union[Unset, SearchRequestFilters]
|
102
|
+
if isinstance(_filters, Unset):
|
103
|
+
filters = UNSET
|
104
|
+
else:
|
105
|
+
filters = SearchRequestFilters.from_dict(_filters)
|
106
|
+
|
107
|
+
search_request = cls(
|
108
|
+
query=query,
|
109
|
+
start_date=start_date,
|
110
|
+
end_date=end_date,
|
111
|
+
page_size=page_size,
|
112
|
+
scroll_id=scroll_id,
|
113
|
+
filters=filters,
|
114
|
+
)
|
115
|
+
|
116
|
+
search_request.additional_properties = d
|
117
|
+
return search_request
|
118
|
+
|
119
|
+
@property
|
120
|
+
def additional_keys(self) -> list[str]:
|
121
|
+
return list(self.additional_properties.keys())
|
122
|
+
|
123
|
+
def __getitem__(self, key: str) -> Any:
|
124
|
+
return self.additional_properties[key]
|
125
|
+
|
126
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
127
|
+
self.additional_properties[key] = value
|
128
|
+
|
129
|
+
def __delitem__(self, key: str) -> None:
|
130
|
+
del self.additional_properties[key]
|
131
|
+
|
132
|
+
def __contains__(self, key: str) -> bool:
|
133
|
+
return key in self.additional_properties
|
scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request_filters.py
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
T = TypeVar("T", bound="SearchRequestFilters")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class SearchRequestFilters:
|
12
|
+
""" """
|
13
|
+
|
14
|
+
additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict)
|
15
|
+
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
17
|
+
field_dict: dict[str, Any] = {}
|
18
|
+
for prop_name, prop in self.additional_properties.items():
|
19
|
+
field_dict[prop_name] = prop
|
20
|
+
|
21
|
+
return field_dict
|
22
|
+
|
23
|
+
@classmethod
|
24
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
25
|
+
d = dict(src_dict)
|
26
|
+
search_request_filters = cls()
|
27
|
+
|
28
|
+
additional_properties = {}
|
29
|
+
for prop_name, prop_dict in d.items():
|
30
|
+
additional_property = cast(list[str], prop_dict)
|
31
|
+
|
32
|
+
additional_properties[prop_name] = additional_property
|
33
|
+
|
34
|
+
search_request_filters.additional_properties = additional_properties
|
35
|
+
return search_request_filters
|
36
|
+
|
37
|
+
@property
|
38
|
+
def additional_keys(self) -> list[str]:
|
39
|
+
return list(self.additional_properties.keys())
|
40
|
+
|
41
|
+
def __getitem__(self, key: str) -> list[str]:
|
42
|
+
return self.additional_properties[key]
|
43
|
+
|
44
|
+
def __setitem__(self, key: str, value: list[str]) -> None:
|
45
|
+
self.additional_properties[key] = value
|
46
|
+
|
47
|
+
def __delitem__(self, key: str) -> None:
|
48
|
+
del self.additional_properties[key]
|
49
|
+
|
50
|
+
def __contains__(self, key: str) -> bool:
|
51
|
+
return key in self.additional_properties
|
@@ -0,0 +1,93 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from ..models.pagination import Pagination
|
11
|
+
from ..models.trace import Trace
|
12
|
+
|
13
|
+
|
14
|
+
T = TypeVar("T", bound="SearchResponse")
|
15
|
+
|
16
|
+
|
17
|
+
@_attrs_define
|
18
|
+
class SearchResponse:
|
19
|
+
"""
|
20
|
+
Attributes:
|
21
|
+
traces (Union[Unset, list['Trace']]):
|
22
|
+
pagination (Union[Unset, Pagination]):
|
23
|
+
"""
|
24
|
+
|
25
|
+
traces: Union[Unset, list["Trace"]] = UNSET
|
26
|
+
pagination: Union[Unset, "Pagination"] = UNSET
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
28
|
+
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
30
|
+
traces: Union[Unset, list[dict[str, Any]]] = UNSET
|
31
|
+
if not isinstance(self.traces, Unset):
|
32
|
+
traces = []
|
33
|
+
for traces_item_data in self.traces:
|
34
|
+
traces_item = traces_item_data.to_dict()
|
35
|
+
traces.append(traces_item)
|
36
|
+
|
37
|
+
pagination: Union[Unset, dict[str, Any]] = UNSET
|
38
|
+
if not isinstance(self.pagination, Unset):
|
39
|
+
pagination = self.pagination.to_dict()
|
40
|
+
|
41
|
+
field_dict: dict[str, Any] = {}
|
42
|
+
field_dict.update(self.additional_properties)
|
43
|
+
field_dict.update({})
|
44
|
+
if traces is not UNSET:
|
45
|
+
field_dict["traces"] = traces
|
46
|
+
if pagination is not UNSET:
|
47
|
+
field_dict["pagination"] = pagination
|
48
|
+
|
49
|
+
return field_dict
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
53
|
+
from ..models.pagination import Pagination
|
54
|
+
from ..models.trace import Trace
|
55
|
+
|
56
|
+
d = dict(src_dict)
|
57
|
+
traces = []
|
58
|
+
_traces = d.pop("traces", UNSET)
|
59
|
+
for traces_item_data in _traces or []:
|
60
|
+
traces_item = Trace.from_dict(traces_item_data)
|
61
|
+
|
62
|
+
traces.append(traces_item)
|
63
|
+
|
64
|
+
_pagination = d.pop("pagination", UNSET)
|
65
|
+
pagination: Union[Unset, Pagination]
|
66
|
+
if isinstance(_pagination, Unset):
|
67
|
+
pagination = UNSET
|
68
|
+
else:
|
69
|
+
pagination = Pagination.from_dict(_pagination)
|
70
|
+
|
71
|
+
search_response = cls(
|
72
|
+
traces=traces,
|
73
|
+
pagination=pagination,
|
74
|
+
)
|
75
|
+
|
76
|
+
search_response.additional_properties = d
|
77
|
+
return search_response
|
78
|
+
|
79
|
+
@property
|
80
|
+
def additional_keys(self) -> list[str]:
|
81
|
+
return list(self.additional_properties.keys())
|
82
|
+
|
83
|
+
def __getitem__(self, key: str) -> Any:
|
84
|
+
return self.additional_properties[key]
|
85
|
+
|
86
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
87
|
+
self.additional_properties[key] = value
|
88
|
+
|
89
|
+
def __delitem__(self, key: str) -> None:
|
90
|
+
del self.additional_properties[key]
|
91
|
+
|
92
|
+
def __contains__(self, key: str) -> bool:
|
93
|
+
return key in self.additional_properties
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, Union
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="Timestamps")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Timestamps:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
inserted_at (Union[Unset, int]):
|
17
|
+
started_at (Union[Unset, int]):
|
18
|
+
updated_at (Union[Unset, int]):
|
19
|
+
"""
|
20
|
+
|
21
|
+
inserted_at: Union[Unset, int] = UNSET
|
22
|
+
started_at: Union[Unset, int] = UNSET
|
23
|
+
updated_at: Union[Unset, int] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
inserted_at = self.inserted_at
|
28
|
+
|
29
|
+
started_at = self.started_at
|
30
|
+
|
31
|
+
updated_at = self.updated_at
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if inserted_at is not UNSET:
|
37
|
+
field_dict["inserted_at"] = inserted_at
|
38
|
+
if started_at is not UNSET:
|
39
|
+
field_dict["started_at"] = started_at
|
40
|
+
if updated_at is not UNSET:
|
41
|
+
field_dict["updated_at"] = updated_at
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
47
|
+
d = dict(src_dict)
|
48
|
+
inserted_at = d.pop("inserted_at", UNSET)
|
49
|
+
|
50
|
+
started_at = d.pop("started_at", UNSET)
|
51
|
+
|
52
|
+
updated_at = d.pop("updated_at", UNSET)
|
53
|
+
|
54
|
+
timestamps = cls(
|
55
|
+
inserted_at=inserted_at,
|
56
|
+
started_at=started_at,
|
57
|
+
updated_at=updated_at,
|
58
|
+
)
|
59
|
+
|
60
|
+
timestamps.additional_properties = d
|
61
|
+
return timestamps
|
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
|