langwatch-scenario 0.6.0__py3-none-any.whl → 0.7.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/METADATA +145 -41
- langwatch_scenario-0.7.2.dist-info/RECORD +237 -0
- scenario/__init__.py +1 -4
- scenario/{events → _events}/__init__.py +9 -11
- scenario/_events/event_bus.py +185 -0
- scenario/{events → _events}/event_reporter.py +1 -1
- scenario/{events → _events}/events.py +20 -27
- scenario/_events/messages.py +58 -0
- scenario/{events → _events}/utils.py +43 -32
- scenario/_generated/langwatch_api_client/README.md +139 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/__init__.py +13 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_annotations_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_prompts_by_id.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_scenario_events.py +183 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations.py +136 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations_trace_id.py +160 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_dataset_by_slug_or_id.py +229 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts.py +188 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts_by_id.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts_by_id_versions.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_trace_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/patch_api_annotations_id.py +178 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_annotations_trace_id.py +178 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_dataset_by_slug_entries.py +108 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_prompts.py +187 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_prompts_by_id_versions.py +241 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_scenario_events.py +229 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_trace_id_share.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_trace_id_unshare.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/put_api_prompts_by_id.py +241 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/traces/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/traces/post_api_trace_search.py +168 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/client.py +268 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/errors.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/__init__.py +455 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/annotation.py +131 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/dataset_post_entries.py +74 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/dataset_post_entries_entries_item.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_annotations_id_response_200.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_200.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_400.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_401.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/error.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/evaluation.py +164 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/evaluation_timestamps.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200.py +75 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200_data_item.py +109 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200_data_item_entry.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_400.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_401.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_404.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_422.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_500.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data.py +204 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations.py +101 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200.py +249 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_error_type_0.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item.py +152 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item_error.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item_timestamps.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_input.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_metrics.py +95 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_output.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item.py +271 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_error_type_0.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_input.py +90 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_input_value_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_metrics.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_output.py +89 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_output_value_item.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_params.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_timestamps.py +95 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_timestamps.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/input_.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/metrics.py +115 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/output.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/pagination.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/patch_api_annotations_id_body.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/patch_api_annotations_id_response_200.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_annotations_trace_id_body.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_body.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body.py +147 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data.py +207 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations.py +106 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data.py +206 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations.py +101 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_0.py +127 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_0_metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1.py +164 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_results_type_0.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_results_type_0_verdict.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_status.py +13 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2.py +245 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_0.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_1.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2.py +120 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item.py +87 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item_function.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_3.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_4.py +85 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_201.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_400.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_401.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_trace_id_share_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_trace_id_unshare_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_body.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_200.py +75 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request.py +133 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request_filters.py +51 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_response.py +93 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/timestamps.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/trace.py +225 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/py.typed +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/types.py +46 -0
- scenario/_generated/langwatch_api_client/pyproject.toml +27 -0
- scenario/_utils/__init__.py +1 -1
- scenario/_utils/message_conversion.py +2 -2
- scenario/judge_agent.py +6 -1
- scenario/pytest_plugin.py +4 -4
- scenario/scenario_executor.py +196 -223
- scenario/types.py +5 -2
- langwatch_scenario-0.6.0.dist-info/RECORD +0 -27
- scenario/events/event_bus.py +0 -175
- scenario/events/messages.py +0 -84
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/WHEEL +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/entry_points.txt +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,155 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data import (
|
11
|
+
PostApiPromptsByIdVersionsResponse200ConfigData,
|
12
|
+
)
|
13
|
+
|
14
|
+
|
15
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsResponse200")
|
16
|
+
|
17
|
+
|
18
|
+
@_attrs_define
|
19
|
+
class PostApiPromptsByIdVersionsResponse200:
|
20
|
+
"""
|
21
|
+
Attributes:
|
22
|
+
id (str):
|
23
|
+
author_id (Union[None, str]):
|
24
|
+
project_id (str):
|
25
|
+
config_id (str):
|
26
|
+
schema_version (Literal['1.0']):
|
27
|
+
version (float):
|
28
|
+
created_at (str):
|
29
|
+
config_data (PostApiPromptsByIdVersionsResponse200ConfigData):
|
30
|
+
commit_message (Union[None, Unset, str]):
|
31
|
+
"""
|
32
|
+
|
33
|
+
id: str
|
34
|
+
author_id: Union[None, str]
|
35
|
+
project_id: str
|
36
|
+
config_id: str
|
37
|
+
schema_version: Literal["1.0"]
|
38
|
+
version: float
|
39
|
+
created_at: str
|
40
|
+
config_data: "PostApiPromptsByIdVersionsResponse200ConfigData"
|
41
|
+
commit_message: Union[None, Unset, str] = UNSET
|
42
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
43
|
+
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
45
|
+
id = self.id
|
46
|
+
|
47
|
+
author_id: Union[None, str]
|
48
|
+
author_id = self.author_id
|
49
|
+
|
50
|
+
project_id = self.project_id
|
51
|
+
|
52
|
+
config_id = self.config_id
|
53
|
+
|
54
|
+
schema_version = self.schema_version
|
55
|
+
|
56
|
+
version = self.version
|
57
|
+
|
58
|
+
created_at = self.created_at
|
59
|
+
|
60
|
+
config_data = self.config_data.to_dict()
|
61
|
+
|
62
|
+
commit_message: Union[None, Unset, str]
|
63
|
+
if isinstance(self.commit_message, Unset):
|
64
|
+
commit_message = UNSET
|
65
|
+
else:
|
66
|
+
commit_message = self.commit_message
|
67
|
+
|
68
|
+
field_dict: dict[str, Any] = {}
|
69
|
+
field_dict.update(self.additional_properties)
|
70
|
+
field_dict.update(
|
71
|
+
{
|
72
|
+
"id": id,
|
73
|
+
"authorId": author_id,
|
74
|
+
"projectId": project_id,
|
75
|
+
"configId": config_id,
|
76
|
+
"schemaVersion": schema_version,
|
77
|
+
"version": version,
|
78
|
+
"createdAt": created_at,
|
79
|
+
"configData": config_data,
|
80
|
+
}
|
81
|
+
)
|
82
|
+
if commit_message is not UNSET:
|
83
|
+
field_dict["commitMessage"] = commit_message
|
84
|
+
|
85
|
+
return field_dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
89
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data import (
|
90
|
+
PostApiPromptsByIdVersionsResponse200ConfigData,
|
91
|
+
)
|
92
|
+
|
93
|
+
d = dict(src_dict)
|
94
|
+
id = d.pop("id")
|
95
|
+
|
96
|
+
def _parse_author_id(data: object) -> Union[None, str]:
|
97
|
+
if data is None:
|
98
|
+
return data
|
99
|
+
return cast(Union[None, str], data)
|
100
|
+
|
101
|
+
author_id = _parse_author_id(d.pop("authorId"))
|
102
|
+
|
103
|
+
project_id = d.pop("projectId")
|
104
|
+
|
105
|
+
config_id = d.pop("configId")
|
106
|
+
|
107
|
+
schema_version = cast(Literal["1.0"], d.pop("schemaVersion"))
|
108
|
+
if schema_version != "1.0":
|
109
|
+
raise ValueError(f"schemaVersion must match const '1.0', got '{schema_version}'")
|
110
|
+
|
111
|
+
version = d.pop("version")
|
112
|
+
|
113
|
+
created_at = d.pop("createdAt")
|
114
|
+
|
115
|
+
config_data = PostApiPromptsByIdVersionsResponse200ConfigData.from_dict(d.pop("configData"))
|
116
|
+
|
117
|
+
def _parse_commit_message(data: object) -> Union[None, Unset, str]:
|
118
|
+
if data is None:
|
119
|
+
return data
|
120
|
+
if isinstance(data, Unset):
|
121
|
+
return data
|
122
|
+
return cast(Union[None, Unset, str], data)
|
123
|
+
|
124
|
+
commit_message = _parse_commit_message(d.pop("commitMessage", UNSET))
|
125
|
+
|
126
|
+
post_api_prompts_by_id_versions_response_200 = cls(
|
127
|
+
id=id,
|
128
|
+
author_id=author_id,
|
129
|
+
project_id=project_id,
|
130
|
+
config_id=config_id,
|
131
|
+
schema_version=schema_version,
|
132
|
+
version=version,
|
133
|
+
created_at=created_at,
|
134
|
+
config_data=config_data,
|
135
|
+
commit_message=commit_message,
|
136
|
+
)
|
137
|
+
|
138
|
+
post_api_prompts_by_id_versions_response_200.additional_properties = d
|
139
|
+
return post_api_prompts_by_id_versions_response_200
|
140
|
+
|
141
|
+
@property
|
142
|
+
def additional_keys(self) -> list[str]:
|
143
|
+
return list(self.additional_properties.keys())
|
144
|
+
|
145
|
+
def __getitem__(self, key: str) -> Any:
|
146
|
+
return self.additional_properties[key]
|
147
|
+
|
148
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
149
|
+
self.additional_properties[key] = value
|
150
|
+
|
151
|
+
def __delitem__(self, key: str) -> None:
|
152
|
+
del self.additional_properties[key]
|
153
|
+
|
154
|
+
def __contains__(self, key: str) -> bool:
|
155
|
+
return key in self.additional_properties
|
@@ -0,0 +1,206 @@
|
|
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.post_api_prompts_by_id_versions_response_200_config_data_demonstrations import (
|
11
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations,
|
12
|
+
)
|
13
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_inputs_item import (
|
14
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem,
|
15
|
+
)
|
16
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_messages_item import (
|
17
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem,
|
18
|
+
)
|
19
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_outputs_item import (
|
20
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem,
|
21
|
+
)
|
22
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_prompting_technique import (
|
23
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique,
|
24
|
+
)
|
25
|
+
|
26
|
+
|
27
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsResponse200ConfigData")
|
28
|
+
|
29
|
+
|
30
|
+
@_attrs_define
|
31
|
+
class PostApiPromptsByIdVersionsResponse200ConfigData:
|
32
|
+
"""
|
33
|
+
Attributes:
|
34
|
+
prompt (str):
|
35
|
+
messages (list['PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem']):
|
36
|
+
inputs (list['PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem']):
|
37
|
+
outputs (list['PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem']):
|
38
|
+
model (str):
|
39
|
+
demonstrations (PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations):
|
40
|
+
version (Union[Unset, float]):
|
41
|
+
temperature (Union[Unset, float]):
|
42
|
+
max_tokens (Union[Unset, float]):
|
43
|
+
prompting_technique (Union[Unset, PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique]):
|
44
|
+
"""
|
45
|
+
|
46
|
+
prompt: str
|
47
|
+
messages: list["PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem"]
|
48
|
+
inputs: list["PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem"]
|
49
|
+
outputs: list["PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem"]
|
50
|
+
model: str
|
51
|
+
demonstrations: "PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations"
|
52
|
+
version: Union[Unset, float] = UNSET
|
53
|
+
temperature: Union[Unset, float] = UNSET
|
54
|
+
max_tokens: Union[Unset, float] = UNSET
|
55
|
+
prompting_technique: Union[Unset, "PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique"] = UNSET
|
56
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
57
|
+
|
58
|
+
def to_dict(self) -> dict[str, Any]:
|
59
|
+
prompt = self.prompt
|
60
|
+
|
61
|
+
messages = []
|
62
|
+
for messages_item_data in self.messages:
|
63
|
+
messages_item = messages_item_data.to_dict()
|
64
|
+
messages.append(messages_item)
|
65
|
+
|
66
|
+
inputs = []
|
67
|
+
for inputs_item_data in self.inputs:
|
68
|
+
inputs_item = inputs_item_data.to_dict()
|
69
|
+
inputs.append(inputs_item)
|
70
|
+
|
71
|
+
outputs = []
|
72
|
+
for outputs_item_data in self.outputs:
|
73
|
+
outputs_item = outputs_item_data.to_dict()
|
74
|
+
outputs.append(outputs_item)
|
75
|
+
|
76
|
+
model = self.model
|
77
|
+
|
78
|
+
demonstrations = self.demonstrations.to_dict()
|
79
|
+
|
80
|
+
version = self.version
|
81
|
+
|
82
|
+
temperature = self.temperature
|
83
|
+
|
84
|
+
max_tokens = self.max_tokens
|
85
|
+
|
86
|
+
prompting_technique: Union[Unset, dict[str, Any]] = UNSET
|
87
|
+
if not isinstance(self.prompting_technique, Unset):
|
88
|
+
prompting_technique = self.prompting_technique.to_dict()
|
89
|
+
|
90
|
+
field_dict: dict[str, Any] = {}
|
91
|
+
field_dict.update(self.additional_properties)
|
92
|
+
field_dict.update(
|
93
|
+
{
|
94
|
+
"prompt": prompt,
|
95
|
+
"messages": messages,
|
96
|
+
"inputs": inputs,
|
97
|
+
"outputs": outputs,
|
98
|
+
"model": model,
|
99
|
+
"demonstrations": demonstrations,
|
100
|
+
}
|
101
|
+
)
|
102
|
+
if version is not UNSET:
|
103
|
+
field_dict["version"] = version
|
104
|
+
if temperature is not UNSET:
|
105
|
+
field_dict["temperature"] = temperature
|
106
|
+
if max_tokens is not UNSET:
|
107
|
+
field_dict["max_tokens"] = max_tokens
|
108
|
+
if prompting_technique is not UNSET:
|
109
|
+
field_dict["prompting_technique"] = prompting_technique
|
110
|
+
|
111
|
+
return field_dict
|
112
|
+
|
113
|
+
@classmethod
|
114
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
115
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_demonstrations import (
|
116
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations,
|
117
|
+
)
|
118
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_inputs_item import (
|
119
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem,
|
120
|
+
)
|
121
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_messages_item import (
|
122
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem,
|
123
|
+
)
|
124
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_outputs_item import (
|
125
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem,
|
126
|
+
)
|
127
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_prompting_technique import (
|
128
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique,
|
129
|
+
)
|
130
|
+
|
131
|
+
d = dict(src_dict)
|
132
|
+
prompt = d.pop("prompt")
|
133
|
+
|
134
|
+
messages = []
|
135
|
+
_messages = d.pop("messages")
|
136
|
+
for messages_item_data in _messages:
|
137
|
+
messages_item = PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem.from_dict(messages_item_data)
|
138
|
+
|
139
|
+
messages.append(messages_item)
|
140
|
+
|
141
|
+
inputs = []
|
142
|
+
_inputs = d.pop("inputs")
|
143
|
+
for inputs_item_data in _inputs:
|
144
|
+
inputs_item = PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem.from_dict(inputs_item_data)
|
145
|
+
|
146
|
+
inputs.append(inputs_item)
|
147
|
+
|
148
|
+
outputs = []
|
149
|
+
_outputs = d.pop("outputs")
|
150
|
+
for outputs_item_data in _outputs:
|
151
|
+
outputs_item = PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem.from_dict(outputs_item_data)
|
152
|
+
|
153
|
+
outputs.append(outputs_item)
|
154
|
+
|
155
|
+
model = d.pop("model")
|
156
|
+
|
157
|
+
demonstrations = PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations.from_dict(
|
158
|
+
d.pop("demonstrations")
|
159
|
+
)
|
160
|
+
|
161
|
+
version = d.pop("version", UNSET)
|
162
|
+
|
163
|
+
temperature = d.pop("temperature", UNSET)
|
164
|
+
|
165
|
+
max_tokens = d.pop("max_tokens", UNSET)
|
166
|
+
|
167
|
+
_prompting_technique = d.pop("prompting_technique", UNSET)
|
168
|
+
prompting_technique: Union[Unset, PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique]
|
169
|
+
if isinstance(_prompting_technique, Unset):
|
170
|
+
prompting_technique = UNSET
|
171
|
+
else:
|
172
|
+
prompting_technique = PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique.from_dict(
|
173
|
+
_prompting_technique
|
174
|
+
)
|
175
|
+
|
176
|
+
post_api_prompts_by_id_versions_response_200_config_data = cls(
|
177
|
+
prompt=prompt,
|
178
|
+
messages=messages,
|
179
|
+
inputs=inputs,
|
180
|
+
outputs=outputs,
|
181
|
+
model=model,
|
182
|
+
demonstrations=demonstrations,
|
183
|
+
version=version,
|
184
|
+
temperature=temperature,
|
185
|
+
max_tokens=max_tokens,
|
186
|
+
prompting_technique=prompting_technique,
|
187
|
+
)
|
188
|
+
|
189
|
+
post_api_prompts_by_id_versions_response_200_config_data.additional_properties = d
|
190
|
+
return post_api_prompts_by_id_versions_response_200_config_data
|
191
|
+
|
192
|
+
@property
|
193
|
+
def additional_keys(self) -> list[str]:
|
194
|
+
return list(self.additional_properties.keys())
|
195
|
+
|
196
|
+
def __getitem__(self, key: str) -> Any:
|
197
|
+
return self.additional_properties[key]
|
198
|
+
|
199
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
200
|
+
self.additional_properties[key] = value
|
201
|
+
|
202
|
+
def __delitem__(self, key: str) -> None:
|
203
|
+
del self.additional_properties[key]
|
204
|
+
|
205
|
+
def __contains__(self, key: str) -> bool:
|
206
|
+
return key in self.additional_properties
|
@@ -0,0 +1,101 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item import (
|
9
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem,
|
10
|
+
)
|
11
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item import (
|
12
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem,
|
13
|
+
)
|
14
|
+
|
15
|
+
|
16
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations")
|
17
|
+
|
18
|
+
|
19
|
+
@_attrs_define
|
20
|
+
class PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations:
|
21
|
+
"""
|
22
|
+
Attributes:
|
23
|
+
columns (list['PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem']):
|
24
|
+
rows (list['PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem']):
|
25
|
+
"""
|
26
|
+
|
27
|
+
columns: list["PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem"]
|
28
|
+
rows: list["PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem"]
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
30
|
+
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
32
|
+
columns = []
|
33
|
+
for columns_item_data in self.columns:
|
34
|
+
columns_item = columns_item_data.to_dict()
|
35
|
+
columns.append(columns_item)
|
36
|
+
|
37
|
+
rows = []
|
38
|
+
for rows_item_data in self.rows:
|
39
|
+
rows_item = rows_item_data.to_dict()
|
40
|
+
rows.append(rows_item)
|
41
|
+
|
42
|
+
field_dict: dict[str, Any] = {}
|
43
|
+
field_dict.update(self.additional_properties)
|
44
|
+
field_dict.update(
|
45
|
+
{
|
46
|
+
"columns": columns,
|
47
|
+
"rows": rows,
|
48
|
+
}
|
49
|
+
)
|
50
|
+
|
51
|
+
return field_dict
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
55
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item import (
|
56
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem,
|
57
|
+
)
|
58
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item import (
|
59
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem,
|
60
|
+
)
|
61
|
+
|
62
|
+
d = dict(src_dict)
|
63
|
+
columns = []
|
64
|
+
_columns = d.pop("columns")
|
65
|
+
for columns_item_data in _columns:
|
66
|
+
columns_item = PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem.from_dict(
|
67
|
+
columns_item_data
|
68
|
+
)
|
69
|
+
|
70
|
+
columns.append(columns_item)
|
71
|
+
|
72
|
+
rows = []
|
73
|
+
_rows = d.pop("rows")
|
74
|
+
for rows_item_data in _rows:
|
75
|
+
rows_item = PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem.from_dict(rows_item_data)
|
76
|
+
|
77
|
+
rows.append(rows_item)
|
78
|
+
|
79
|
+
post_api_prompts_by_id_versions_response_200_config_data_demonstrations = cls(
|
80
|
+
columns=columns,
|
81
|
+
rows=rows,
|
82
|
+
)
|
83
|
+
|
84
|
+
post_api_prompts_by_id_versions_response_200_config_data_demonstrations.additional_properties = d
|
85
|
+
return post_api_prompts_by_id_versions_response_200_config_data_demonstrations
|
86
|
+
|
87
|
+
@property
|
88
|
+
def additional_keys(self) -> list[str]:
|
89
|
+
return list(self.additional_properties.keys())
|
90
|
+
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
92
|
+
return self.additional_properties[key]
|
93
|
+
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
95
|
+
self.additional_properties[key] = value
|
96
|
+
|
97
|
+
def __delitem__(self, key: str) -> None:
|
98
|
+
del self.additional_properties[key]
|
99
|
+
|
100
|
+
def __contains__(self, key: str) -> bool:
|
101
|
+
return key in self.additional_properties
|
@@ -0,0 +1,79 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type import (
|
8
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType,
|
9
|
+
)
|
10
|
+
|
11
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem")
|
12
|
+
|
13
|
+
|
14
|
+
@_attrs_define
|
15
|
+
class PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem:
|
16
|
+
"""
|
17
|
+
Attributes:
|
18
|
+
id (str):
|
19
|
+
name (str):
|
20
|
+
type_ (PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType):
|
21
|
+
"""
|
22
|
+
|
23
|
+
id: str
|
24
|
+
name: str
|
25
|
+
type_: PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
27
|
+
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
29
|
+
id = self.id
|
30
|
+
|
31
|
+
name = self.name
|
32
|
+
|
33
|
+
type_ = self.type_.value
|
34
|
+
|
35
|
+
field_dict: dict[str, Any] = {}
|
36
|
+
field_dict.update(self.additional_properties)
|
37
|
+
field_dict.update(
|
38
|
+
{
|
39
|
+
"id": id,
|
40
|
+
"name": name,
|
41
|
+
"type": type_,
|
42
|
+
}
|
43
|
+
)
|
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
|
+
id = d.pop("id")
|
51
|
+
|
52
|
+
name = d.pop("name")
|
53
|
+
|
54
|
+
type_ = PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType(d.pop("type"))
|
55
|
+
|
56
|
+
post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item = cls(
|
57
|
+
id=id,
|
58
|
+
name=name,
|
59
|
+
type_=type_,
|
60
|
+
)
|
61
|
+
|
62
|
+
post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.additional_properties = d
|
63
|
+
return post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item
|
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
|
@@ -0,0 +1,18 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
|
4
|
+
class PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType(str, Enum):
|
5
|
+
ANNOTATIONS = "annotations"
|
6
|
+
BOOLEAN = "boolean"
|
7
|
+
CHAT_MESSAGES = "chat_messages"
|
8
|
+
DATE = "date"
|
9
|
+
EVALUATIONS = "evaluations"
|
10
|
+
JSON = "json"
|
11
|
+
LIST = "list"
|
12
|
+
NUMBER = "number"
|
13
|
+
RAG_CONTEXTS = "rag_contexts"
|
14
|
+
SPANS = "spans"
|
15
|
+
STRING = "string"
|
16
|
+
|
17
|
+
def __str__(self) -> str:
|
18
|
+
return str(self.value)
|
@@ -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="PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem:
|
12
|
+
"""
|
13
|
+
Attributes:
|
14
|
+
id (str):
|
15
|
+
"""
|
16
|
+
|
17
|
+
id: str
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
19
|
+
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
21
|
+
id = self.id
|
22
|
+
|
23
|
+
field_dict: dict[str, Any] = {}
|
24
|
+
field_dict.update(self.additional_properties)
|
25
|
+
field_dict.update(
|
26
|
+
{
|
27
|
+
"id": id,
|
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
|
+
id = d.pop("id")
|
37
|
+
|
38
|
+
post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item = cls(
|
39
|
+
id=id,
|
40
|
+
)
|
41
|
+
|
42
|
+
post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.additional_properties = d
|
43
|
+
return post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item
|
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,71 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..models.post_api_prompts_by_id_versions_response_200_config_data_inputs_item_type import (
|
8
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataInputsItemType,
|
9
|
+
)
|
10
|
+
|
11
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem")
|
12
|
+
|
13
|
+
|
14
|
+
@_attrs_define
|
15
|
+
class PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem:
|
16
|
+
"""
|
17
|
+
Attributes:
|
18
|
+
identifier (str):
|
19
|
+
type_ (PostApiPromptsByIdVersionsResponse200ConfigDataInputsItemType):
|
20
|
+
"""
|
21
|
+
|
22
|
+
identifier: str
|
23
|
+
type_: PostApiPromptsByIdVersionsResponse200ConfigDataInputsItemType
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
identifier = self.identifier
|
28
|
+
|
29
|
+
type_ = self.type_.value
|
30
|
+
|
31
|
+
field_dict: dict[str, Any] = {}
|
32
|
+
field_dict.update(self.additional_properties)
|
33
|
+
field_dict.update(
|
34
|
+
{
|
35
|
+
"identifier": identifier,
|
36
|
+
"type": type_,
|
37
|
+
}
|
38
|
+
)
|
39
|
+
|
40
|
+
return field_dict
|
41
|
+
|
42
|
+
@classmethod
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
44
|
+
d = dict(src_dict)
|
45
|
+
identifier = d.pop("identifier")
|
46
|
+
|
47
|
+
type_ = PostApiPromptsByIdVersionsResponse200ConfigDataInputsItemType(d.pop("type"))
|
48
|
+
|
49
|
+
post_api_prompts_by_id_versions_response_200_config_data_inputs_item = cls(
|
50
|
+
identifier=identifier,
|
51
|
+
type_=type_,
|
52
|
+
)
|
53
|
+
|
54
|
+
post_api_prompts_by_id_versions_response_200_config_data_inputs_item.additional_properties = d
|
55
|
+
return post_api_prompts_by_id_versions_response_200_config_data_inputs_item
|
56
|
+
|
57
|
+
@property
|
58
|
+
def additional_keys(self) -> list[str]:
|
59
|
+
return list(self.additional_properties.keys())
|
60
|
+
|
61
|
+
def __getitem__(self, key: str) -> Any:
|
62
|
+
return self.additional_properties[key]
|
63
|
+
|
64
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
65
|
+
self.additional_properties[key] = value
|
66
|
+
|
67
|
+
def __delitem__(self, key: str) -> None:
|
68
|
+
del self.additional_properties[key]
|
69
|
+
|
70
|
+
def __contains__(self, key: str) -> bool:
|
71
|
+
return key in self.additional_properties
|