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,455 @@
|
|
1
|
+
"""Contains all the data models used in inputs/outputs"""
|
2
|
+
|
3
|
+
from .annotation import Annotation
|
4
|
+
from .dataset_post_entries import DatasetPostEntries
|
5
|
+
from .dataset_post_entries_entries_item import DatasetPostEntriesEntriesItem
|
6
|
+
from .delete_api_annotations_id_response_200 import DeleteApiAnnotationsIdResponse200
|
7
|
+
from .delete_api_prompts_by_id_response_200 import DeleteApiPromptsByIdResponse200
|
8
|
+
from .delete_api_prompts_by_id_response_400 import DeleteApiPromptsByIdResponse400
|
9
|
+
from .delete_api_prompts_by_id_response_400_error import DeleteApiPromptsByIdResponse400Error
|
10
|
+
from .delete_api_prompts_by_id_response_401 import DeleteApiPromptsByIdResponse401
|
11
|
+
from .delete_api_prompts_by_id_response_401_error import DeleteApiPromptsByIdResponse401Error
|
12
|
+
from .delete_api_prompts_by_id_response_404 import DeleteApiPromptsByIdResponse404
|
13
|
+
from .delete_api_prompts_by_id_response_500 import DeleteApiPromptsByIdResponse500
|
14
|
+
from .delete_api_scenario_events_response_200 import DeleteApiScenarioEventsResponse200
|
15
|
+
from .delete_api_scenario_events_response_400 import DeleteApiScenarioEventsResponse400
|
16
|
+
from .delete_api_scenario_events_response_401 import DeleteApiScenarioEventsResponse401
|
17
|
+
from .delete_api_scenario_events_response_500 import DeleteApiScenarioEventsResponse500
|
18
|
+
from .error import Error
|
19
|
+
from .evaluation import Evaluation
|
20
|
+
from .evaluation_timestamps import EvaluationTimestamps
|
21
|
+
from .get_api_dataset_by_slug_or_id_response_200 import GetApiDatasetBySlugOrIdResponse200
|
22
|
+
from .get_api_dataset_by_slug_or_id_response_200_data_item import GetApiDatasetBySlugOrIdResponse200DataItem
|
23
|
+
from .get_api_dataset_by_slug_or_id_response_200_data_item_entry import GetApiDatasetBySlugOrIdResponse200DataItemEntry
|
24
|
+
from .get_api_dataset_by_slug_or_id_response_400 import GetApiDatasetBySlugOrIdResponse400
|
25
|
+
from .get_api_dataset_by_slug_or_id_response_401 import GetApiDatasetBySlugOrIdResponse401
|
26
|
+
from .get_api_dataset_by_slug_or_id_response_404 import GetApiDatasetBySlugOrIdResponse404
|
27
|
+
from .get_api_dataset_by_slug_or_id_response_422 import GetApiDatasetBySlugOrIdResponse422
|
28
|
+
from .get_api_dataset_by_slug_or_id_response_500 import GetApiDatasetBySlugOrIdResponse500
|
29
|
+
from .get_api_prompts_by_id_response_200 import GetApiPromptsByIdResponse200
|
30
|
+
from .get_api_prompts_by_id_response_200_messages_item import GetApiPromptsByIdResponse200MessagesItem
|
31
|
+
from .get_api_prompts_by_id_response_200_messages_item_role import GetApiPromptsByIdResponse200MessagesItemRole
|
32
|
+
from .get_api_prompts_by_id_response_200_response_format_type_0 import GetApiPromptsByIdResponse200ResponseFormatType0
|
33
|
+
from .get_api_prompts_by_id_response_200_response_format_type_0_json_schema import (
|
34
|
+
GetApiPromptsByIdResponse200ResponseFormatType0JsonSchema,
|
35
|
+
)
|
36
|
+
from .get_api_prompts_by_id_response_200_response_format_type_0_json_schema_schema import (
|
37
|
+
GetApiPromptsByIdResponse200ResponseFormatType0JsonSchemaSchema,
|
38
|
+
)
|
39
|
+
from .get_api_prompts_by_id_response_200_response_format_type_0_type import (
|
40
|
+
GetApiPromptsByIdResponse200ResponseFormatType0Type,
|
41
|
+
)
|
42
|
+
from .get_api_prompts_by_id_response_400 import GetApiPromptsByIdResponse400
|
43
|
+
from .get_api_prompts_by_id_response_400_error import GetApiPromptsByIdResponse400Error
|
44
|
+
from .get_api_prompts_by_id_response_401 import GetApiPromptsByIdResponse401
|
45
|
+
from .get_api_prompts_by_id_response_401_error import GetApiPromptsByIdResponse401Error
|
46
|
+
from .get_api_prompts_by_id_response_404 import GetApiPromptsByIdResponse404
|
47
|
+
from .get_api_prompts_by_id_response_500 import GetApiPromptsByIdResponse500
|
48
|
+
from .get_api_prompts_by_id_versions_response_200 import GetApiPromptsByIdVersionsResponse200
|
49
|
+
from .get_api_prompts_by_id_versions_response_200_config_data import GetApiPromptsByIdVersionsResponse200ConfigData
|
50
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_demonstrations import (
|
51
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrations,
|
52
|
+
)
|
53
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item import (
|
54
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem,
|
55
|
+
)
|
56
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type import (
|
57
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType,
|
58
|
+
)
|
59
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item import (
|
60
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem,
|
61
|
+
)
|
62
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_inputs_item import (
|
63
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataInputsItem,
|
64
|
+
)
|
65
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_inputs_item_type import (
|
66
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType,
|
67
|
+
)
|
68
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_messages_item import (
|
69
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItem,
|
70
|
+
)
|
71
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_messages_item_role import (
|
72
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole,
|
73
|
+
)
|
74
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_outputs_item import (
|
75
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItem,
|
76
|
+
)
|
77
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema import (
|
78
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema,
|
79
|
+
)
|
80
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_outputs_item_type import (
|
81
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType,
|
82
|
+
)
|
83
|
+
from .get_api_prompts_by_id_versions_response_200_config_data_prompting_technique import (
|
84
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique,
|
85
|
+
)
|
86
|
+
from .get_api_prompts_by_id_versions_response_400 import GetApiPromptsByIdVersionsResponse400
|
87
|
+
from .get_api_prompts_by_id_versions_response_400_error import GetApiPromptsByIdVersionsResponse400Error
|
88
|
+
from .get_api_prompts_by_id_versions_response_401 import GetApiPromptsByIdVersionsResponse401
|
89
|
+
from .get_api_prompts_by_id_versions_response_401_error import GetApiPromptsByIdVersionsResponse401Error
|
90
|
+
from .get_api_prompts_by_id_versions_response_404 import GetApiPromptsByIdVersionsResponse404
|
91
|
+
from .get_api_prompts_by_id_versions_response_500 import GetApiPromptsByIdVersionsResponse500
|
92
|
+
from .get_api_prompts_response_200_item import GetApiPromptsResponse200Item
|
93
|
+
from .get_api_prompts_response_200_item_messages_item import GetApiPromptsResponse200ItemMessagesItem
|
94
|
+
from .get_api_prompts_response_200_item_messages_item_role import GetApiPromptsResponse200ItemMessagesItemRole
|
95
|
+
from .get_api_prompts_response_200_item_response_format_type_0 import GetApiPromptsResponse200ItemResponseFormatType0
|
96
|
+
from .get_api_prompts_response_200_item_response_format_type_0_json_schema import (
|
97
|
+
GetApiPromptsResponse200ItemResponseFormatType0JsonSchema,
|
98
|
+
)
|
99
|
+
from .get_api_prompts_response_200_item_response_format_type_0_json_schema_schema import (
|
100
|
+
GetApiPromptsResponse200ItemResponseFormatType0JsonSchemaSchema,
|
101
|
+
)
|
102
|
+
from .get_api_prompts_response_200_item_response_format_type_0_type import (
|
103
|
+
GetApiPromptsResponse200ItemResponseFormatType0Type,
|
104
|
+
)
|
105
|
+
from .get_api_prompts_response_400 import GetApiPromptsResponse400
|
106
|
+
from .get_api_prompts_response_400_error import GetApiPromptsResponse400Error
|
107
|
+
from .get_api_prompts_response_401 import GetApiPromptsResponse401
|
108
|
+
from .get_api_prompts_response_401_error import GetApiPromptsResponse401Error
|
109
|
+
from .get_api_prompts_response_500 import GetApiPromptsResponse500
|
110
|
+
from .get_api_trace_id_response_200 import GetApiTraceIdResponse200
|
111
|
+
from .get_api_trace_id_response_200_error_type_0 import GetApiTraceIdResponse200ErrorType0
|
112
|
+
from .get_api_trace_id_response_200_evaluations_item import GetApiTraceIdResponse200EvaluationsItem
|
113
|
+
from .get_api_trace_id_response_200_evaluations_item_error import GetApiTraceIdResponse200EvaluationsItemError
|
114
|
+
from .get_api_trace_id_response_200_evaluations_item_timestamps import GetApiTraceIdResponse200EvaluationsItemTimestamps
|
115
|
+
from .get_api_trace_id_response_200_input import GetApiTraceIdResponse200Input
|
116
|
+
from .get_api_trace_id_response_200_metadata import GetApiTraceIdResponse200Metadata
|
117
|
+
from .get_api_trace_id_response_200_metrics import GetApiTraceIdResponse200Metrics
|
118
|
+
from .get_api_trace_id_response_200_output import GetApiTraceIdResponse200Output
|
119
|
+
from .get_api_trace_id_response_200_spans_item import GetApiTraceIdResponse200SpansItem
|
120
|
+
from .get_api_trace_id_response_200_spans_item_error_type_0 import GetApiTraceIdResponse200SpansItemErrorType0
|
121
|
+
from .get_api_trace_id_response_200_spans_item_input import GetApiTraceIdResponse200SpansItemInput
|
122
|
+
from .get_api_trace_id_response_200_spans_item_input_value_item import GetApiTraceIdResponse200SpansItemInputValueItem
|
123
|
+
from .get_api_trace_id_response_200_spans_item_metrics import GetApiTraceIdResponse200SpansItemMetrics
|
124
|
+
from .get_api_trace_id_response_200_spans_item_output import GetApiTraceIdResponse200SpansItemOutput
|
125
|
+
from .get_api_trace_id_response_200_spans_item_output_value_item import GetApiTraceIdResponse200SpansItemOutputValueItem
|
126
|
+
from .get_api_trace_id_response_200_spans_item_params import GetApiTraceIdResponse200SpansItemParams
|
127
|
+
from .get_api_trace_id_response_200_spans_item_timestamps import GetApiTraceIdResponse200SpansItemTimestamps
|
128
|
+
from .get_api_trace_id_response_200_timestamps import GetApiTraceIdResponse200Timestamps
|
129
|
+
from .input_ import Input
|
130
|
+
from .metadata import Metadata
|
131
|
+
from .metrics import Metrics
|
132
|
+
from .output import Output
|
133
|
+
from .pagination import Pagination
|
134
|
+
from .patch_api_annotations_id_body import PatchApiAnnotationsIdBody
|
135
|
+
from .patch_api_annotations_id_response_200 import PatchApiAnnotationsIdResponse200
|
136
|
+
from .post_api_annotations_trace_id_body import PostApiAnnotationsTraceIdBody
|
137
|
+
from .post_api_prompts_body import PostApiPromptsBody
|
138
|
+
from .post_api_prompts_by_id_versions_body import PostApiPromptsByIdVersionsBody
|
139
|
+
from .post_api_prompts_by_id_versions_body_config_data import PostApiPromptsByIdVersionsBodyConfigData
|
140
|
+
from .post_api_prompts_by_id_versions_body_config_data_demonstrations import (
|
141
|
+
PostApiPromptsByIdVersionsBodyConfigDataDemonstrations,
|
142
|
+
)
|
143
|
+
from .post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item import (
|
144
|
+
PostApiPromptsByIdVersionsBodyConfigDataDemonstrationsColumnsItem,
|
145
|
+
)
|
146
|
+
from .post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item_type import (
|
147
|
+
PostApiPromptsByIdVersionsBodyConfigDataDemonstrationsColumnsItemType,
|
148
|
+
)
|
149
|
+
from .post_api_prompts_by_id_versions_body_config_data_demonstrations_rows_item import (
|
150
|
+
PostApiPromptsByIdVersionsBodyConfigDataDemonstrationsRowsItem,
|
151
|
+
)
|
152
|
+
from .post_api_prompts_by_id_versions_body_config_data_inputs_item import (
|
153
|
+
PostApiPromptsByIdVersionsBodyConfigDataInputsItem,
|
154
|
+
)
|
155
|
+
from .post_api_prompts_by_id_versions_body_config_data_inputs_item_type import (
|
156
|
+
PostApiPromptsByIdVersionsBodyConfigDataInputsItemType,
|
157
|
+
)
|
158
|
+
from .post_api_prompts_by_id_versions_body_config_data_messages_item import (
|
159
|
+
PostApiPromptsByIdVersionsBodyConfigDataMessagesItem,
|
160
|
+
)
|
161
|
+
from .post_api_prompts_by_id_versions_body_config_data_messages_item_role import (
|
162
|
+
PostApiPromptsByIdVersionsBodyConfigDataMessagesItemRole,
|
163
|
+
)
|
164
|
+
from .post_api_prompts_by_id_versions_body_config_data_outputs_item import (
|
165
|
+
PostApiPromptsByIdVersionsBodyConfigDataOutputsItem,
|
166
|
+
)
|
167
|
+
from .post_api_prompts_by_id_versions_body_config_data_outputs_item_json_schema import (
|
168
|
+
PostApiPromptsByIdVersionsBodyConfigDataOutputsItemJsonSchema,
|
169
|
+
)
|
170
|
+
from .post_api_prompts_by_id_versions_body_config_data_outputs_item_type import (
|
171
|
+
PostApiPromptsByIdVersionsBodyConfigDataOutputsItemType,
|
172
|
+
)
|
173
|
+
from .post_api_prompts_by_id_versions_body_config_data_prompting_technique import (
|
174
|
+
PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique,
|
175
|
+
)
|
176
|
+
from .post_api_prompts_by_id_versions_response_200 import PostApiPromptsByIdVersionsResponse200
|
177
|
+
from .post_api_prompts_by_id_versions_response_200_config_data import PostApiPromptsByIdVersionsResponse200ConfigData
|
178
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_demonstrations import (
|
179
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations,
|
180
|
+
)
|
181
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item import (
|
182
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem,
|
183
|
+
)
|
184
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type import (
|
185
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType,
|
186
|
+
)
|
187
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item import (
|
188
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem,
|
189
|
+
)
|
190
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_inputs_item import (
|
191
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem,
|
192
|
+
)
|
193
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_inputs_item_type import (
|
194
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataInputsItemType,
|
195
|
+
)
|
196
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_messages_item import (
|
197
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem,
|
198
|
+
)
|
199
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_messages_item_role import (
|
200
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole,
|
201
|
+
)
|
202
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_outputs_item import (
|
203
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem,
|
204
|
+
)
|
205
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema import (
|
206
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema,
|
207
|
+
)
|
208
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_outputs_item_type import (
|
209
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType,
|
210
|
+
)
|
211
|
+
from .post_api_prompts_by_id_versions_response_200_config_data_prompting_technique import (
|
212
|
+
PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique,
|
213
|
+
)
|
214
|
+
from .post_api_prompts_by_id_versions_response_400 import PostApiPromptsByIdVersionsResponse400
|
215
|
+
from .post_api_prompts_by_id_versions_response_400_error import PostApiPromptsByIdVersionsResponse400Error
|
216
|
+
from .post_api_prompts_by_id_versions_response_401 import PostApiPromptsByIdVersionsResponse401
|
217
|
+
from .post_api_prompts_by_id_versions_response_401_error import PostApiPromptsByIdVersionsResponse401Error
|
218
|
+
from .post_api_prompts_by_id_versions_response_404 import PostApiPromptsByIdVersionsResponse404
|
219
|
+
from .post_api_prompts_by_id_versions_response_500 import PostApiPromptsByIdVersionsResponse500
|
220
|
+
from .post_api_prompts_response_200 import PostApiPromptsResponse200
|
221
|
+
from .post_api_prompts_response_200_messages_item import PostApiPromptsResponse200MessagesItem
|
222
|
+
from .post_api_prompts_response_200_messages_item_role import PostApiPromptsResponse200MessagesItemRole
|
223
|
+
from .post_api_prompts_response_200_response_format_type_0 import PostApiPromptsResponse200ResponseFormatType0
|
224
|
+
from .post_api_prompts_response_200_response_format_type_0_json_schema import (
|
225
|
+
PostApiPromptsResponse200ResponseFormatType0JsonSchema,
|
226
|
+
)
|
227
|
+
from .post_api_prompts_response_200_response_format_type_0_json_schema_schema import (
|
228
|
+
PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema,
|
229
|
+
)
|
230
|
+
from .post_api_prompts_response_200_response_format_type_0_type import PostApiPromptsResponse200ResponseFormatType0Type
|
231
|
+
from .post_api_prompts_response_400 import PostApiPromptsResponse400
|
232
|
+
from .post_api_prompts_response_400_error import PostApiPromptsResponse400Error
|
233
|
+
from .post_api_prompts_response_401 import PostApiPromptsResponse401
|
234
|
+
from .post_api_prompts_response_401_error import PostApiPromptsResponse401Error
|
235
|
+
from .post_api_prompts_response_500 import PostApiPromptsResponse500
|
236
|
+
from .post_api_scenario_events_body_type_0 import PostApiScenarioEventsBodyType0
|
237
|
+
from .post_api_scenario_events_body_type_0_metadata import PostApiScenarioEventsBodyType0Metadata
|
238
|
+
from .post_api_scenario_events_body_type_1 import PostApiScenarioEventsBodyType1
|
239
|
+
from .post_api_scenario_events_body_type_1_results_type_0 import PostApiScenarioEventsBodyType1ResultsType0
|
240
|
+
from .post_api_scenario_events_body_type_1_results_type_0_verdict import (
|
241
|
+
PostApiScenarioEventsBodyType1ResultsType0Verdict,
|
242
|
+
)
|
243
|
+
from .post_api_scenario_events_body_type_1_status import PostApiScenarioEventsBodyType1Status
|
244
|
+
from .post_api_scenario_events_body_type_2 import PostApiScenarioEventsBodyType2
|
245
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_0 import PostApiScenarioEventsBodyType2MessagesItemType0
|
246
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_1 import PostApiScenarioEventsBodyType2MessagesItemType1
|
247
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_2 import PostApiScenarioEventsBodyType2MessagesItemType2
|
248
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item import (
|
249
|
+
PostApiScenarioEventsBodyType2MessagesItemType2ToolCallsItem,
|
250
|
+
)
|
251
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item_function import (
|
252
|
+
PostApiScenarioEventsBodyType2MessagesItemType2ToolCallsItemFunction,
|
253
|
+
)
|
254
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_3 import PostApiScenarioEventsBodyType2MessagesItemType3
|
255
|
+
from .post_api_scenario_events_body_type_2_messages_item_type_4 import PostApiScenarioEventsBodyType2MessagesItemType4
|
256
|
+
from .post_api_scenario_events_response_201 import PostApiScenarioEventsResponse201
|
257
|
+
from .post_api_scenario_events_response_400 import PostApiScenarioEventsResponse400
|
258
|
+
from .post_api_scenario_events_response_401 import PostApiScenarioEventsResponse401
|
259
|
+
from .post_api_scenario_events_response_500 import PostApiScenarioEventsResponse500
|
260
|
+
from .post_api_trace_id_share_response_200 import PostApiTraceIdShareResponse200
|
261
|
+
from .post_api_trace_id_unshare_response_200 import PostApiTraceIdUnshareResponse200
|
262
|
+
from .put_api_prompts_by_id_body import PutApiPromptsByIdBody
|
263
|
+
from .put_api_prompts_by_id_response_200 import PutApiPromptsByIdResponse200
|
264
|
+
from .put_api_prompts_by_id_response_400 import PutApiPromptsByIdResponse400
|
265
|
+
from .put_api_prompts_by_id_response_400_error import PutApiPromptsByIdResponse400Error
|
266
|
+
from .put_api_prompts_by_id_response_401 import PutApiPromptsByIdResponse401
|
267
|
+
from .put_api_prompts_by_id_response_401_error import PutApiPromptsByIdResponse401Error
|
268
|
+
from .put_api_prompts_by_id_response_404 import PutApiPromptsByIdResponse404
|
269
|
+
from .put_api_prompts_by_id_response_500 import PutApiPromptsByIdResponse500
|
270
|
+
from .search_request import SearchRequest
|
271
|
+
from .search_request_filters import SearchRequestFilters
|
272
|
+
from .search_response import SearchResponse
|
273
|
+
from .timestamps import Timestamps
|
274
|
+
from .trace import Trace
|
275
|
+
|
276
|
+
__all__ = (
|
277
|
+
"Annotation",
|
278
|
+
"DatasetPostEntries",
|
279
|
+
"DatasetPostEntriesEntriesItem",
|
280
|
+
"DeleteApiAnnotationsIdResponse200",
|
281
|
+
"DeleteApiPromptsByIdResponse200",
|
282
|
+
"DeleteApiPromptsByIdResponse400",
|
283
|
+
"DeleteApiPromptsByIdResponse400Error",
|
284
|
+
"DeleteApiPromptsByIdResponse401",
|
285
|
+
"DeleteApiPromptsByIdResponse401Error",
|
286
|
+
"DeleteApiPromptsByIdResponse404",
|
287
|
+
"DeleteApiPromptsByIdResponse500",
|
288
|
+
"DeleteApiScenarioEventsResponse200",
|
289
|
+
"DeleteApiScenarioEventsResponse400",
|
290
|
+
"DeleteApiScenarioEventsResponse401",
|
291
|
+
"DeleteApiScenarioEventsResponse500",
|
292
|
+
"Error",
|
293
|
+
"Evaluation",
|
294
|
+
"EvaluationTimestamps",
|
295
|
+
"GetApiDatasetBySlugOrIdResponse200",
|
296
|
+
"GetApiDatasetBySlugOrIdResponse200DataItem",
|
297
|
+
"GetApiDatasetBySlugOrIdResponse200DataItemEntry",
|
298
|
+
"GetApiDatasetBySlugOrIdResponse400",
|
299
|
+
"GetApiDatasetBySlugOrIdResponse401",
|
300
|
+
"GetApiDatasetBySlugOrIdResponse404",
|
301
|
+
"GetApiDatasetBySlugOrIdResponse422",
|
302
|
+
"GetApiDatasetBySlugOrIdResponse500",
|
303
|
+
"GetApiPromptsByIdResponse200",
|
304
|
+
"GetApiPromptsByIdResponse200MessagesItem",
|
305
|
+
"GetApiPromptsByIdResponse200MessagesItemRole",
|
306
|
+
"GetApiPromptsByIdResponse200ResponseFormatType0",
|
307
|
+
"GetApiPromptsByIdResponse200ResponseFormatType0JsonSchema",
|
308
|
+
"GetApiPromptsByIdResponse200ResponseFormatType0JsonSchemaSchema",
|
309
|
+
"GetApiPromptsByIdResponse200ResponseFormatType0Type",
|
310
|
+
"GetApiPromptsByIdResponse400",
|
311
|
+
"GetApiPromptsByIdResponse400Error",
|
312
|
+
"GetApiPromptsByIdResponse401",
|
313
|
+
"GetApiPromptsByIdResponse401Error",
|
314
|
+
"GetApiPromptsByIdResponse404",
|
315
|
+
"GetApiPromptsByIdResponse500",
|
316
|
+
"GetApiPromptsByIdVersionsResponse200",
|
317
|
+
"GetApiPromptsByIdVersionsResponse200ConfigData",
|
318
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrations",
|
319
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem",
|
320
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType",
|
321
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem",
|
322
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataInputsItem",
|
323
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType",
|
324
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItem",
|
325
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole",
|
326
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItem",
|
327
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema",
|
328
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType",
|
329
|
+
"GetApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique",
|
330
|
+
"GetApiPromptsByIdVersionsResponse400",
|
331
|
+
"GetApiPromptsByIdVersionsResponse400Error",
|
332
|
+
"GetApiPromptsByIdVersionsResponse401",
|
333
|
+
"GetApiPromptsByIdVersionsResponse401Error",
|
334
|
+
"GetApiPromptsByIdVersionsResponse404",
|
335
|
+
"GetApiPromptsByIdVersionsResponse500",
|
336
|
+
"GetApiPromptsResponse200Item",
|
337
|
+
"GetApiPromptsResponse200ItemMessagesItem",
|
338
|
+
"GetApiPromptsResponse200ItemMessagesItemRole",
|
339
|
+
"GetApiPromptsResponse200ItemResponseFormatType0",
|
340
|
+
"GetApiPromptsResponse200ItemResponseFormatType0JsonSchema",
|
341
|
+
"GetApiPromptsResponse200ItemResponseFormatType0JsonSchemaSchema",
|
342
|
+
"GetApiPromptsResponse200ItemResponseFormatType0Type",
|
343
|
+
"GetApiPromptsResponse400",
|
344
|
+
"GetApiPromptsResponse400Error",
|
345
|
+
"GetApiPromptsResponse401",
|
346
|
+
"GetApiPromptsResponse401Error",
|
347
|
+
"GetApiPromptsResponse500",
|
348
|
+
"GetApiTraceIdResponse200",
|
349
|
+
"GetApiTraceIdResponse200ErrorType0",
|
350
|
+
"GetApiTraceIdResponse200EvaluationsItem",
|
351
|
+
"GetApiTraceIdResponse200EvaluationsItemError",
|
352
|
+
"GetApiTraceIdResponse200EvaluationsItemTimestamps",
|
353
|
+
"GetApiTraceIdResponse200Input",
|
354
|
+
"GetApiTraceIdResponse200Metadata",
|
355
|
+
"GetApiTraceIdResponse200Metrics",
|
356
|
+
"GetApiTraceIdResponse200Output",
|
357
|
+
"GetApiTraceIdResponse200SpansItem",
|
358
|
+
"GetApiTraceIdResponse200SpansItemErrorType0",
|
359
|
+
"GetApiTraceIdResponse200SpansItemInput",
|
360
|
+
"GetApiTraceIdResponse200SpansItemInputValueItem",
|
361
|
+
"GetApiTraceIdResponse200SpansItemMetrics",
|
362
|
+
"GetApiTraceIdResponse200SpansItemOutput",
|
363
|
+
"GetApiTraceIdResponse200SpansItemOutputValueItem",
|
364
|
+
"GetApiTraceIdResponse200SpansItemParams",
|
365
|
+
"GetApiTraceIdResponse200SpansItemTimestamps",
|
366
|
+
"GetApiTraceIdResponse200Timestamps",
|
367
|
+
"Input",
|
368
|
+
"Metadata",
|
369
|
+
"Metrics",
|
370
|
+
"Output",
|
371
|
+
"Pagination",
|
372
|
+
"PatchApiAnnotationsIdBody",
|
373
|
+
"PatchApiAnnotationsIdResponse200",
|
374
|
+
"PostApiAnnotationsTraceIdBody",
|
375
|
+
"PostApiPromptsBody",
|
376
|
+
"PostApiPromptsByIdVersionsBody",
|
377
|
+
"PostApiPromptsByIdVersionsBodyConfigData",
|
378
|
+
"PostApiPromptsByIdVersionsBodyConfigDataDemonstrations",
|
379
|
+
"PostApiPromptsByIdVersionsBodyConfigDataDemonstrationsColumnsItem",
|
380
|
+
"PostApiPromptsByIdVersionsBodyConfigDataDemonstrationsColumnsItemType",
|
381
|
+
"PostApiPromptsByIdVersionsBodyConfigDataDemonstrationsRowsItem",
|
382
|
+
"PostApiPromptsByIdVersionsBodyConfigDataInputsItem",
|
383
|
+
"PostApiPromptsByIdVersionsBodyConfigDataInputsItemType",
|
384
|
+
"PostApiPromptsByIdVersionsBodyConfigDataMessagesItem",
|
385
|
+
"PostApiPromptsByIdVersionsBodyConfigDataMessagesItemRole",
|
386
|
+
"PostApiPromptsByIdVersionsBodyConfigDataOutputsItem",
|
387
|
+
"PostApiPromptsByIdVersionsBodyConfigDataOutputsItemJsonSchema",
|
388
|
+
"PostApiPromptsByIdVersionsBodyConfigDataOutputsItemType",
|
389
|
+
"PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique",
|
390
|
+
"PostApiPromptsByIdVersionsResponse200",
|
391
|
+
"PostApiPromptsByIdVersionsResponse200ConfigData",
|
392
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrations",
|
393
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem",
|
394
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType",
|
395
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem",
|
396
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataInputsItem",
|
397
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataInputsItemType",
|
398
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItem",
|
399
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole",
|
400
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItem",
|
401
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema",
|
402
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType",
|
403
|
+
"PostApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique",
|
404
|
+
"PostApiPromptsByIdVersionsResponse400",
|
405
|
+
"PostApiPromptsByIdVersionsResponse400Error",
|
406
|
+
"PostApiPromptsByIdVersionsResponse401",
|
407
|
+
"PostApiPromptsByIdVersionsResponse401Error",
|
408
|
+
"PostApiPromptsByIdVersionsResponse404",
|
409
|
+
"PostApiPromptsByIdVersionsResponse500",
|
410
|
+
"PostApiPromptsResponse200",
|
411
|
+
"PostApiPromptsResponse200MessagesItem",
|
412
|
+
"PostApiPromptsResponse200MessagesItemRole",
|
413
|
+
"PostApiPromptsResponse200ResponseFormatType0",
|
414
|
+
"PostApiPromptsResponse200ResponseFormatType0JsonSchema",
|
415
|
+
"PostApiPromptsResponse200ResponseFormatType0JsonSchemaSchema",
|
416
|
+
"PostApiPromptsResponse200ResponseFormatType0Type",
|
417
|
+
"PostApiPromptsResponse400",
|
418
|
+
"PostApiPromptsResponse400Error",
|
419
|
+
"PostApiPromptsResponse401",
|
420
|
+
"PostApiPromptsResponse401Error",
|
421
|
+
"PostApiPromptsResponse500",
|
422
|
+
"PostApiScenarioEventsBodyType0",
|
423
|
+
"PostApiScenarioEventsBodyType0Metadata",
|
424
|
+
"PostApiScenarioEventsBodyType1",
|
425
|
+
"PostApiScenarioEventsBodyType1ResultsType0",
|
426
|
+
"PostApiScenarioEventsBodyType1ResultsType0Verdict",
|
427
|
+
"PostApiScenarioEventsBodyType1Status",
|
428
|
+
"PostApiScenarioEventsBodyType2",
|
429
|
+
"PostApiScenarioEventsBodyType2MessagesItemType0",
|
430
|
+
"PostApiScenarioEventsBodyType2MessagesItemType1",
|
431
|
+
"PostApiScenarioEventsBodyType2MessagesItemType2",
|
432
|
+
"PostApiScenarioEventsBodyType2MessagesItemType2ToolCallsItem",
|
433
|
+
"PostApiScenarioEventsBodyType2MessagesItemType2ToolCallsItemFunction",
|
434
|
+
"PostApiScenarioEventsBodyType2MessagesItemType3",
|
435
|
+
"PostApiScenarioEventsBodyType2MessagesItemType4",
|
436
|
+
"PostApiScenarioEventsResponse201",
|
437
|
+
"PostApiScenarioEventsResponse400",
|
438
|
+
"PostApiScenarioEventsResponse401",
|
439
|
+
"PostApiScenarioEventsResponse500",
|
440
|
+
"PostApiTraceIdShareResponse200",
|
441
|
+
"PostApiTraceIdUnshareResponse200",
|
442
|
+
"PutApiPromptsByIdBody",
|
443
|
+
"PutApiPromptsByIdResponse200",
|
444
|
+
"PutApiPromptsByIdResponse400",
|
445
|
+
"PutApiPromptsByIdResponse400Error",
|
446
|
+
"PutApiPromptsByIdResponse401",
|
447
|
+
"PutApiPromptsByIdResponse401Error",
|
448
|
+
"PutApiPromptsByIdResponse404",
|
449
|
+
"PutApiPromptsByIdResponse500",
|
450
|
+
"SearchRequest",
|
451
|
+
"SearchRequestFilters",
|
452
|
+
"SearchResponse",
|
453
|
+
"Timestamps",
|
454
|
+
"Trace",
|
455
|
+
)
|
@@ -0,0 +1,131 @@
|
|
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="Annotation")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Annotation:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
id (Union[Unset, str]): The ID of the annotation
|
17
|
+
project_id (Union[Unset, str]): The ID of the project
|
18
|
+
trace_id (Union[Unset, str]): The ID of the trace
|
19
|
+
comment (Union[Unset, str]): The comment of the annotation
|
20
|
+
is_thumbs_up (Union[Unset, bool]): The thumbs up status of the annotation
|
21
|
+
user_id (Union[Unset, str]): The ID of the user
|
22
|
+
created_at (Union[Unset, str]): The created at of the annotation
|
23
|
+
updated_at (Union[Unset, str]): The updated at of the annotation
|
24
|
+
email (Union[Unset, str]): The email of the user
|
25
|
+
"""
|
26
|
+
|
27
|
+
id: Union[Unset, str] = UNSET
|
28
|
+
project_id: Union[Unset, str] = UNSET
|
29
|
+
trace_id: Union[Unset, str] = UNSET
|
30
|
+
comment: Union[Unset, str] = UNSET
|
31
|
+
is_thumbs_up: Union[Unset, bool] = UNSET
|
32
|
+
user_id: Union[Unset, str] = UNSET
|
33
|
+
created_at: Union[Unset, str] = UNSET
|
34
|
+
updated_at: Union[Unset, str] = UNSET
|
35
|
+
email: Union[Unset, str] = UNSET
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
37
|
+
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
39
|
+
id = self.id
|
40
|
+
|
41
|
+
project_id = self.project_id
|
42
|
+
|
43
|
+
trace_id = self.trace_id
|
44
|
+
|
45
|
+
comment = self.comment
|
46
|
+
|
47
|
+
is_thumbs_up = self.is_thumbs_up
|
48
|
+
|
49
|
+
user_id = self.user_id
|
50
|
+
|
51
|
+
created_at = self.created_at
|
52
|
+
|
53
|
+
updated_at = self.updated_at
|
54
|
+
|
55
|
+
email = self.email
|
56
|
+
|
57
|
+
field_dict: dict[str, Any] = {}
|
58
|
+
field_dict.update(self.additional_properties)
|
59
|
+
field_dict.update({})
|
60
|
+
if id is not UNSET:
|
61
|
+
field_dict["id"] = id
|
62
|
+
if project_id is not UNSET:
|
63
|
+
field_dict["projectId"] = project_id
|
64
|
+
if trace_id is not UNSET:
|
65
|
+
field_dict["traceId"] = trace_id
|
66
|
+
if comment is not UNSET:
|
67
|
+
field_dict["comment"] = comment
|
68
|
+
if is_thumbs_up is not UNSET:
|
69
|
+
field_dict["isThumbsUp"] = is_thumbs_up
|
70
|
+
if user_id is not UNSET:
|
71
|
+
field_dict["userId"] = user_id
|
72
|
+
if created_at is not UNSET:
|
73
|
+
field_dict["createdAt"] = created_at
|
74
|
+
if updated_at is not UNSET:
|
75
|
+
field_dict["updatedAt"] = updated_at
|
76
|
+
if email is not UNSET:
|
77
|
+
field_dict["email"] = email
|
78
|
+
|
79
|
+
return field_dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
83
|
+
d = dict(src_dict)
|
84
|
+
id = d.pop("id", UNSET)
|
85
|
+
|
86
|
+
project_id = d.pop("projectId", UNSET)
|
87
|
+
|
88
|
+
trace_id = d.pop("traceId", UNSET)
|
89
|
+
|
90
|
+
comment = d.pop("comment", UNSET)
|
91
|
+
|
92
|
+
is_thumbs_up = d.pop("isThumbsUp", UNSET)
|
93
|
+
|
94
|
+
user_id = d.pop("userId", UNSET)
|
95
|
+
|
96
|
+
created_at = d.pop("createdAt", UNSET)
|
97
|
+
|
98
|
+
updated_at = d.pop("updatedAt", UNSET)
|
99
|
+
|
100
|
+
email = d.pop("email", UNSET)
|
101
|
+
|
102
|
+
annotation = cls(
|
103
|
+
id=id,
|
104
|
+
project_id=project_id,
|
105
|
+
trace_id=trace_id,
|
106
|
+
comment=comment,
|
107
|
+
is_thumbs_up=is_thumbs_up,
|
108
|
+
user_id=user_id,
|
109
|
+
created_at=created_at,
|
110
|
+
updated_at=updated_at,
|
111
|
+
email=email,
|
112
|
+
)
|
113
|
+
|
114
|
+
annotation.additional_properties = d
|
115
|
+
return annotation
|
116
|
+
|
117
|
+
@property
|
118
|
+
def additional_keys(self) -> list[str]:
|
119
|
+
return list(self.additional_properties.keys())
|
120
|
+
|
121
|
+
def __getitem__(self, key: str) -> Any:
|
122
|
+
return self.additional_properties[key]
|
123
|
+
|
124
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
125
|
+
self.additional_properties[key] = value
|
126
|
+
|
127
|
+
def __delitem__(self, key: str) -> None:
|
128
|
+
del self.additional_properties[key]
|
129
|
+
|
130
|
+
def __contains__(self, key: str) -> bool:
|
131
|
+
return key in self.additional_properties
|
@@ -0,0 +1,74 @@
|
|
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.dataset_post_entries_entries_item import DatasetPostEntriesEntriesItem
|
9
|
+
|
10
|
+
|
11
|
+
T = TypeVar("T", bound="DatasetPostEntries")
|
12
|
+
|
13
|
+
|
14
|
+
@_attrs_define
|
15
|
+
class DatasetPostEntries:
|
16
|
+
"""
|
17
|
+
Attributes:
|
18
|
+
entries (list['DatasetPostEntriesEntriesItem']): Example: [{'input': 'hi', 'output': 'Hello, how can I help you
|
19
|
+
today?'}].
|
20
|
+
"""
|
21
|
+
|
22
|
+
entries: list["DatasetPostEntriesEntriesItem"]
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
24
|
+
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
26
|
+
entries = []
|
27
|
+
for entries_item_data in self.entries:
|
28
|
+
entries_item = entries_item_data.to_dict()
|
29
|
+
entries.append(entries_item)
|
30
|
+
|
31
|
+
field_dict: dict[str, Any] = {}
|
32
|
+
field_dict.update(self.additional_properties)
|
33
|
+
field_dict.update(
|
34
|
+
{
|
35
|
+
"entries": entries,
|
36
|
+
}
|
37
|
+
)
|
38
|
+
|
39
|
+
return field_dict
|
40
|
+
|
41
|
+
@classmethod
|
42
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
43
|
+
from ..models.dataset_post_entries_entries_item import DatasetPostEntriesEntriesItem
|
44
|
+
|
45
|
+
d = dict(src_dict)
|
46
|
+
entries = []
|
47
|
+
_entries = d.pop("entries")
|
48
|
+
for entries_item_data in _entries:
|
49
|
+
entries_item = DatasetPostEntriesEntriesItem.from_dict(entries_item_data)
|
50
|
+
|
51
|
+
entries.append(entries_item)
|
52
|
+
|
53
|
+
dataset_post_entries = cls(
|
54
|
+
entries=entries,
|
55
|
+
)
|
56
|
+
|
57
|
+
dataset_post_entries.additional_properties = d
|
58
|
+
return dataset_post_entries
|
59
|
+
|
60
|
+
@property
|
61
|
+
def additional_keys(self) -> list[str]:
|
62
|
+
return list(self.additional_properties.keys())
|
63
|
+
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
65
|
+
return self.additional_properties[key]
|
66
|
+
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
68
|
+
self.additional_properties[key] = value
|
69
|
+
|
70
|
+
def __delitem__(self, key: str) -> None:
|
71
|
+
del self.additional_properties[key]
|
72
|
+
|
73
|
+
def __contains__(self, key: str) -> bool:
|
74
|
+
return key in self.additional_properties
|