langwatch-scenario 0.6.0__py3-none-any.whl → 0.7.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/METADATA +143 -41
- langwatch_scenario-0.7.1.dist-info/RECORD +237 -0
- scenario/__init__.py +1 -4
- scenario/{events → _events}/__init__.py +9 -11
- scenario/_events/event_bus.py +185 -0
- scenario/{events → _events}/event_reporter.py +1 -1
- scenario/{events → _events}/events.py +20 -27
- scenario/_events/messages.py +58 -0
- scenario/{events → _events}/utils.py +43 -32
- scenario/_generated/langwatch_api_client/README.md +139 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/__init__.py +13 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_annotations_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_prompts_by_id.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/delete_api_scenario_events.py +183 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations.py +136 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_annotations_trace_id.py +160 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_dataset_by_slug_or_id.py +229 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts.py +188 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts_by_id.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_prompts_by_id_versions.py +218 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/get_api_trace_id.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/patch_api_annotations_id.py +178 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_annotations_trace_id.py +178 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_dataset_by_slug_entries.py +108 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_prompts.py +187 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_prompts_by_id_versions.py +241 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_scenario_events.py +229 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_trace_id_share.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/post_api_trace_id_unshare.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/default/put_api_prompts_by_id.py +241 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/traces/__init__.py +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/api/traces/post_api_trace_search.py +168 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/client.py +268 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/errors.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/__init__.py +455 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/annotation.py +131 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/dataset_post_entries.py +74 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/dataset_post_entries_entries_item.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_annotations_id_response_200.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_200.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_400.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_401.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/delete_api_scenario_events_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/error.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/evaluation.py +164 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/evaluation_timestamps.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200.py +75 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200_data_item.py +109 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_200_data_item_entry.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_400.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_401.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_404.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_422.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_dataset_by_slug_or_id_response_500.py +78 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_200_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data.py +204 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations.py +101 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_200_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_by_id_versions_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_200_item_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_prompts_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200.py +249 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_error_type_0.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item.py +152 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item_error.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_evaluations_item_timestamps.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_input.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_metrics.py +95 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_output.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item.py +271 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_error_type_0.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_input.py +90 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_input_value_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_metrics.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_output.py +89 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_output_value_item.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_params.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_spans_item_timestamps.py +95 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/get_api_trace_id_response_200_timestamps.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/input_.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/metrics.py +115 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/output.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/pagination.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/patch_api_annotations_id_body.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/patch_api_annotations_id_response_200.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_annotations_trace_id_body.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_body.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body.py +147 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data.py +207 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations.py +106 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_body_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200.py +155 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data.py +206 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations.py +101 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.py +79 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type.py +18 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_inputs_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_inputs_item_type.py +16 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_messages_item.py +71 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_outputs_item_type.py +11 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_200_config_data_prompting_technique.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_by_id_versions_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200.py +172 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_messages_item.py +69 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_messages_item_role.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_json_schema.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_json_schema_schema.py +44 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_200_response_format_type_0_type.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_0.py +127 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_0_metadata.py +68 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1.py +164 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_results_type_0.py +98 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_results_type_0_verdict.py +10 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_1_status.py +13 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2.py +245 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_0.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_1.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2.py +120 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item.py +87 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_2_tool_calls_item_function.py +67 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_3.py +88 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_body_type_2_messages_item_type_4.py +85 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_201.py +81 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_400.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_401.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_scenario_events_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_trace_id_share_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_trace_id_unshare_response_200.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_body.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_200.py +75 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_400.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_400_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_401.py +61 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_401_error.py +8 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_404.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/put_api_prompts_by_id_response_500.py +59 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request.py +133 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_request_filters.py +51 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/search_response.py +93 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/timestamps.py +77 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/models/trace.py +225 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/py.typed +1 -0
- scenario/_generated/langwatch_api_client/lang_watch_api_client/types.py +46 -0
- scenario/_generated/langwatch_api_client/pyproject.toml +27 -0
- scenario/_utils/__init__.py +1 -1
- scenario/_utils/message_conversion.py +2 -2
- scenario/judge_agent.py +6 -1
- scenario/pytest_plugin.py +4 -4
- scenario/scenario_executor.py +196 -223
- scenario/types.py +5 -2
- langwatch_scenario-0.6.0.dist-info/RECORD +0 -27
- scenario/events/event_bus.py +0 -175
- scenario/events/messages.py +0 -84
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/WHEEL +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/entry_points.txt +0 -0
- {langwatch_scenario-0.6.0.dist-info → langwatch_scenario-0.7.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,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.get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item import (
|
9
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem,
|
10
|
+
)
|
11
|
+
from ..models.get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item import (
|
12
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem,
|
13
|
+
)
|
14
|
+
|
15
|
+
|
16
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrations")
|
17
|
+
|
18
|
+
|
19
|
+
@_attrs_define
|
20
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrations:
|
21
|
+
"""
|
22
|
+
Attributes:
|
23
|
+
columns (list['GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem']):
|
24
|
+
rows (list['GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem']):
|
25
|
+
"""
|
26
|
+
|
27
|
+
columns: list["GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem"]
|
28
|
+
rows: list["GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem"]
|
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.get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item import (
|
56
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem,
|
57
|
+
)
|
58
|
+
from ..models.get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item import (
|
59
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem,
|
60
|
+
)
|
61
|
+
|
62
|
+
d = dict(src_dict)
|
63
|
+
columns = []
|
64
|
+
_columns = d.pop("columns")
|
65
|
+
for columns_item_data in _columns:
|
66
|
+
columns_item = GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem.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 = GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem.from_dict(rows_item_data)
|
76
|
+
|
77
|
+
rows.append(rows_item)
|
78
|
+
|
79
|
+
get_api_prompts_by_id_versions_response_200_config_data_demonstrations = cls(
|
80
|
+
columns=columns,
|
81
|
+
rows=rows,
|
82
|
+
)
|
83
|
+
|
84
|
+
get_api_prompts_by_id_versions_response_200_config_data_demonstrations.additional_properties = d
|
85
|
+
return get_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.get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item_type import (
|
8
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType,
|
9
|
+
)
|
10
|
+
|
11
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem")
|
12
|
+
|
13
|
+
|
14
|
+
@_attrs_define
|
15
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItem:
|
16
|
+
"""
|
17
|
+
Attributes:
|
18
|
+
id (str):
|
19
|
+
name (str):
|
20
|
+
type_ (GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType):
|
21
|
+
"""
|
22
|
+
|
23
|
+
id: str
|
24
|
+
name: str
|
25
|
+
type_: GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType
|
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_ = GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType(d.pop("type"))
|
55
|
+
|
56
|
+
get_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
|
+
get_api_prompts_by_id_versions_response_200_config_data_demonstrations_columns_item.additional_properties = d
|
63
|
+
return get_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 GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsColumnsItemType(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="GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataDemonstrationsRowsItem:
|
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
|
+
get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item = cls(
|
39
|
+
id=id,
|
40
|
+
)
|
41
|
+
|
42
|
+
get_api_prompts_by_id_versions_response_200_config_data_demonstrations_rows_item.additional_properties = d
|
43
|
+
return get_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.get_api_prompts_by_id_versions_response_200_config_data_inputs_item_type import (
|
8
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType,
|
9
|
+
)
|
10
|
+
|
11
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ConfigDataInputsItem")
|
12
|
+
|
13
|
+
|
14
|
+
@_attrs_define
|
15
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataInputsItem:
|
16
|
+
"""
|
17
|
+
Attributes:
|
18
|
+
identifier (str):
|
19
|
+
type_ (GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType):
|
20
|
+
"""
|
21
|
+
|
22
|
+
identifier: str
|
23
|
+
type_: GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType
|
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_ = GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType(d.pop("type"))
|
48
|
+
|
49
|
+
get_api_prompts_by_id_versions_response_200_config_data_inputs_item = cls(
|
50
|
+
identifier=identifier,
|
51
|
+
type_=type_,
|
52
|
+
)
|
53
|
+
|
54
|
+
get_api_prompts_by_id_versions_response_200_config_data_inputs_item.additional_properties = d
|
55
|
+
return get_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
|
@@ -0,0 +1,16 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
|
4
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataInputsItemType(str, Enum):
|
5
|
+
BOOL = "bool"
|
6
|
+
DICT = "dict"
|
7
|
+
FLOAT = "float"
|
8
|
+
IMAGE = "image"
|
9
|
+
LISTBOOL = "list[bool]"
|
10
|
+
LISTFLOAT = "list[float]"
|
11
|
+
LISTINT = "list[int]"
|
12
|
+
LISTSTR = "list[str]"
|
13
|
+
STR = "str"
|
14
|
+
|
15
|
+
def __str__(self) -> str:
|
16
|
+
return str(self.value)
|
@@ -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.get_api_prompts_by_id_versions_response_200_config_data_messages_item_role import (
|
8
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole,
|
9
|
+
)
|
10
|
+
|
11
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItem")
|
12
|
+
|
13
|
+
|
14
|
+
@_attrs_define
|
15
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItem:
|
16
|
+
"""
|
17
|
+
Attributes:
|
18
|
+
role (GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole):
|
19
|
+
content (str):
|
20
|
+
"""
|
21
|
+
|
22
|
+
role: GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole
|
23
|
+
content: str
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
role = self.role.value
|
28
|
+
|
29
|
+
content = self.content
|
30
|
+
|
31
|
+
field_dict: dict[str, Any] = {}
|
32
|
+
field_dict.update(self.additional_properties)
|
33
|
+
field_dict.update(
|
34
|
+
{
|
35
|
+
"role": role,
|
36
|
+
"content": content,
|
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
|
+
role = GetApiPromptsByIdVersionsResponse200ConfigDataMessagesItemRole(d.pop("role"))
|
46
|
+
|
47
|
+
content = d.pop("content")
|
48
|
+
|
49
|
+
get_api_prompts_by_id_versions_response_200_config_data_messages_item = cls(
|
50
|
+
role=role,
|
51
|
+
content=content,
|
52
|
+
)
|
53
|
+
|
54
|
+
get_api_prompts_by_id_versions_response_200_config_data_messages_item.additional_properties = d
|
55
|
+
return get_api_prompts_by_id_versions_response_200_config_data_messages_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
|
@@ -0,0 +1,98 @@
|
|
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 ..models.get_api_prompts_by_id_versions_response_200_config_data_outputs_item_type import (
|
8
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType,
|
9
|
+
)
|
10
|
+
from ..types import UNSET, Unset
|
11
|
+
|
12
|
+
if TYPE_CHECKING:
|
13
|
+
from ..models.get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema import (
|
14
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema,
|
15
|
+
)
|
16
|
+
|
17
|
+
|
18
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItem")
|
19
|
+
|
20
|
+
|
21
|
+
@_attrs_define
|
22
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItem:
|
23
|
+
"""
|
24
|
+
Attributes:
|
25
|
+
identifier (str):
|
26
|
+
type_ (GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType):
|
27
|
+
json_schema (Union[Unset, GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema]):
|
28
|
+
"""
|
29
|
+
|
30
|
+
identifier: str
|
31
|
+
type_: GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType
|
32
|
+
json_schema: Union[Unset, "GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema"] = UNSET
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
34
|
+
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
36
|
+
identifier = self.identifier
|
37
|
+
|
38
|
+
type_ = self.type_.value
|
39
|
+
|
40
|
+
json_schema: Union[Unset, dict[str, Any]] = UNSET
|
41
|
+
if not isinstance(self.json_schema, Unset):
|
42
|
+
json_schema = self.json_schema.to_dict()
|
43
|
+
|
44
|
+
field_dict: dict[str, Any] = {}
|
45
|
+
field_dict.update(self.additional_properties)
|
46
|
+
field_dict.update(
|
47
|
+
{
|
48
|
+
"identifier": identifier,
|
49
|
+
"type": type_,
|
50
|
+
}
|
51
|
+
)
|
52
|
+
if json_schema is not UNSET:
|
53
|
+
field_dict["json_schema"] = json_schema
|
54
|
+
|
55
|
+
return field_dict
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
59
|
+
from ..models.get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema import (
|
60
|
+
GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema,
|
61
|
+
)
|
62
|
+
|
63
|
+
d = dict(src_dict)
|
64
|
+
identifier = d.pop("identifier")
|
65
|
+
|
66
|
+
type_ = GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemType(d.pop("type"))
|
67
|
+
|
68
|
+
_json_schema = d.pop("json_schema", UNSET)
|
69
|
+
json_schema: Union[Unset, GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema]
|
70
|
+
if isinstance(_json_schema, Unset):
|
71
|
+
json_schema = UNSET
|
72
|
+
else:
|
73
|
+
json_schema = GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema.from_dict(_json_schema)
|
74
|
+
|
75
|
+
get_api_prompts_by_id_versions_response_200_config_data_outputs_item = cls(
|
76
|
+
identifier=identifier,
|
77
|
+
type_=type_,
|
78
|
+
json_schema=json_schema,
|
79
|
+
)
|
80
|
+
|
81
|
+
get_api_prompts_by_id_versions_response_200_config_data_outputs_item.additional_properties = d
|
82
|
+
return get_api_prompts_by_id_versions_response_200_config_data_outputs_item
|
83
|
+
|
84
|
+
@property
|
85
|
+
def additional_keys(self) -> list[str]:
|
86
|
+
return list(self.additional_properties.keys())
|
87
|
+
|
88
|
+
def __getitem__(self, key: str) -> Any:
|
89
|
+
return self.additional_properties[key]
|
90
|
+
|
91
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
92
|
+
self.additional_properties[key] = value
|
93
|
+
|
94
|
+
def __delitem__(self, key: str) -> None:
|
95
|
+
del self.additional_properties[key]
|
96
|
+
|
97
|
+
def __contains__(self, key: str) -> bool:
|
98
|
+
return key in self.additional_properties
|
@@ -0,0 +1,59 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataOutputsItemJsonSchema:
|
12
|
+
"""
|
13
|
+
Attributes:
|
14
|
+
type_ (str):
|
15
|
+
"""
|
16
|
+
|
17
|
+
type_: str
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
19
|
+
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
21
|
+
type_ = self.type_
|
22
|
+
|
23
|
+
field_dict: dict[str, Any] = {}
|
24
|
+
field_dict.update(self.additional_properties)
|
25
|
+
field_dict.update(
|
26
|
+
{
|
27
|
+
"type": type_,
|
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
|
+
type_ = d.pop("type")
|
37
|
+
|
38
|
+
get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema = cls(
|
39
|
+
type_=type_,
|
40
|
+
)
|
41
|
+
|
42
|
+
get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema.additional_properties = d
|
43
|
+
return get_api_prompts_by_id_versions_response_200_config_data_outputs_item_json_schema
|
44
|
+
|
45
|
+
@property
|
46
|
+
def additional_keys(self) -> list[str]:
|
47
|
+
return list(self.additional_properties.keys())
|
48
|
+
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
50
|
+
return self.additional_properties[key]
|
51
|
+
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
53
|
+
self.additional_properties[key] = value
|
54
|
+
|
55
|
+
def __delitem__(self, key: str) -> None:
|
56
|
+
del self.additional_properties[key]
|
57
|
+
|
58
|
+
def __contains__(self, key: str) -> bool:
|
59
|
+
return key in self.additional_properties
|
@@ -0,0 +1,59 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, 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="GetApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiPromptsByIdVersionsResponse200ConfigDataPromptingTechnique:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
ref (Union[Unset, str]):
|
17
|
+
"""
|
18
|
+
|
19
|
+
ref: Union[Unset, str] = UNSET
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
+
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
23
|
+
ref = self.ref
|
24
|
+
|
25
|
+
field_dict: dict[str, Any] = {}
|
26
|
+
field_dict.update(self.additional_properties)
|
27
|
+
field_dict.update({})
|
28
|
+
if ref is not UNSET:
|
29
|
+
field_dict["ref"] = ref
|
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
|
+
ref = d.pop("ref", UNSET)
|
37
|
+
|
38
|
+
get_api_prompts_by_id_versions_response_200_config_data_prompting_technique = cls(
|
39
|
+
ref=ref,
|
40
|
+
)
|
41
|
+
|
42
|
+
get_api_prompts_by_id_versions_response_200_config_data_prompting_technique.additional_properties = d
|
43
|
+
return get_api_prompts_by_id_versions_response_200_config_data_prompting_technique
|
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
|