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,77 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, Union
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PatchApiAnnotationsIdBody")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PatchApiAnnotationsIdBody:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
comment (Union[Unset, str]):
|
17
|
+
is_thumbs_up (Union[Unset, bool]):
|
18
|
+
email (Union[Unset, str]):
|
19
|
+
"""
|
20
|
+
|
21
|
+
comment: Union[Unset, str] = UNSET
|
22
|
+
is_thumbs_up: Union[Unset, bool] = UNSET
|
23
|
+
email: Union[Unset, str] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
comment = self.comment
|
28
|
+
|
29
|
+
is_thumbs_up = self.is_thumbs_up
|
30
|
+
|
31
|
+
email = self.email
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if comment is not UNSET:
|
37
|
+
field_dict["comment"] = comment
|
38
|
+
if is_thumbs_up is not UNSET:
|
39
|
+
field_dict["isThumbsUp"] = is_thumbs_up
|
40
|
+
if email is not UNSET:
|
41
|
+
field_dict["email"] = email
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
47
|
+
d = dict(src_dict)
|
48
|
+
comment = d.pop("comment", UNSET)
|
49
|
+
|
50
|
+
is_thumbs_up = d.pop("isThumbsUp", UNSET)
|
51
|
+
|
52
|
+
email = d.pop("email", UNSET)
|
53
|
+
|
54
|
+
patch_api_annotations_id_body = cls(
|
55
|
+
comment=comment,
|
56
|
+
is_thumbs_up=is_thumbs_up,
|
57
|
+
email=email,
|
58
|
+
)
|
59
|
+
|
60
|
+
patch_api_annotations_id_body.additional_properties = d
|
61
|
+
return patch_api_annotations_id_body
|
62
|
+
|
63
|
+
@property
|
64
|
+
def additional_keys(self) -> list[str]:
|
65
|
+
return list(self.additional_properties.keys())
|
66
|
+
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
68
|
+
return self.additional_properties[key]
|
69
|
+
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
71
|
+
self.additional_properties[key] = value
|
72
|
+
|
73
|
+
def __delitem__(self, key: str) -> None:
|
74
|
+
del self.additional_properties[key]
|
75
|
+
|
76
|
+
def __contains__(self, key: str) -> bool:
|
77
|
+
return key in self.additional_properties
|
@@ -0,0 +1,68 @@
|
|
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="PatchApiAnnotationsIdResponse200")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PatchApiAnnotationsIdResponse200:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
status (Union[Unset, str]):
|
17
|
+
message (Union[Unset, str]):
|
18
|
+
"""
|
19
|
+
|
20
|
+
status: Union[Unset, str] = UNSET
|
21
|
+
message: Union[Unset, str] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
status = self.status
|
26
|
+
|
27
|
+
message = self.message
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if status is not UNSET:
|
33
|
+
field_dict["status"] = status
|
34
|
+
if message is not UNSET:
|
35
|
+
field_dict["message"] = message
|
36
|
+
|
37
|
+
return field_dict
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
41
|
+
d = dict(src_dict)
|
42
|
+
status = d.pop("status", UNSET)
|
43
|
+
|
44
|
+
message = d.pop("message", UNSET)
|
45
|
+
|
46
|
+
patch_api_annotations_id_response_200 = cls(
|
47
|
+
status=status,
|
48
|
+
message=message,
|
49
|
+
)
|
50
|
+
|
51
|
+
patch_api_annotations_id_response_200.additional_properties = d
|
52
|
+
return patch_api_annotations_id_response_200
|
53
|
+
|
54
|
+
@property
|
55
|
+
def additional_keys(self) -> list[str]:
|
56
|
+
return list(self.additional_properties.keys())
|
57
|
+
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
59
|
+
return self.additional_properties[key]
|
60
|
+
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
62
|
+
self.additional_properties[key] = value
|
63
|
+
|
64
|
+
def __delitem__(self, key: str) -> None:
|
65
|
+
del self.additional_properties[key]
|
66
|
+
|
67
|
+
def __contains__(self, key: str) -> bool:
|
68
|
+
return key in self.additional_properties
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, TypeVar, Union
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
T = TypeVar("T", bound="PostApiAnnotationsTraceIdBody")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class PostApiAnnotationsTraceIdBody:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
comment (Union[Unset, str]):
|
17
|
+
is_thumbs_up (Union[Unset, bool]):
|
18
|
+
email (Union[Unset, str]):
|
19
|
+
"""
|
20
|
+
|
21
|
+
comment: Union[Unset, str] = UNSET
|
22
|
+
is_thumbs_up: Union[Unset, bool] = UNSET
|
23
|
+
email: Union[Unset, str] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
comment = self.comment
|
28
|
+
|
29
|
+
is_thumbs_up = self.is_thumbs_up
|
30
|
+
|
31
|
+
email = self.email
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if comment is not UNSET:
|
37
|
+
field_dict["comment"] = comment
|
38
|
+
if is_thumbs_up is not UNSET:
|
39
|
+
field_dict["isThumbsUp"] = is_thumbs_up
|
40
|
+
if email is not UNSET:
|
41
|
+
field_dict["email"] = email
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
47
|
+
d = dict(src_dict)
|
48
|
+
comment = d.pop("comment", UNSET)
|
49
|
+
|
50
|
+
is_thumbs_up = d.pop("isThumbsUp", UNSET)
|
51
|
+
|
52
|
+
email = d.pop("email", UNSET)
|
53
|
+
|
54
|
+
post_api_annotations_trace_id_body = cls(
|
55
|
+
comment=comment,
|
56
|
+
is_thumbs_up=is_thumbs_up,
|
57
|
+
email=email,
|
58
|
+
)
|
59
|
+
|
60
|
+
post_api_annotations_trace_id_body.additional_properties = d
|
61
|
+
return post_api_annotations_trace_id_body
|
62
|
+
|
63
|
+
@property
|
64
|
+
def additional_keys(self) -> list[str]:
|
65
|
+
return list(self.additional_properties.keys())
|
66
|
+
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
68
|
+
return self.additional_properties[key]
|
69
|
+
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
71
|
+
self.additional_properties[key] = value
|
72
|
+
|
73
|
+
def __delitem__(self, key: str) -> None:
|
74
|
+
del self.additional_properties[key]
|
75
|
+
|
76
|
+
def __contains__(self, key: str) -> bool:
|
77
|
+
return key in self.additional_properties
|
scenario/_generated/langwatch_api_client/lang_watch_api_client/models/post_api_prompts_body.py
ADDED
@@ -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="PostApiPromptsBody")
|
8
|
+
|
9
|
+
|
10
|
+
@_attrs_define
|
11
|
+
class PostApiPromptsBody:
|
12
|
+
"""
|
13
|
+
Attributes:
|
14
|
+
name (str):
|
15
|
+
"""
|
16
|
+
|
17
|
+
name: str
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
19
|
+
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
21
|
+
name = self.name
|
22
|
+
|
23
|
+
field_dict: dict[str, Any] = {}
|
24
|
+
field_dict.update(self.additional_properties)
|
25
|
+
field_dict.update(
|
26
|
+
{
|
27
|
+
"name": name,
|
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
|
+
name = d.pop("name")
|
37
|
+
|
38
|
+
post_api_prompts_body = cls(
|
39
|
+
name=name,
|
40
|
+
)
|
41
|
+
|
42
|
+
post_api_prompts_body.additional_properties = d
|
43
|
+
return post_api_prompts_body
|
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,147 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union, cast
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data import PostApiPromptsByIdVersionsBodyConfigData
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsBody")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class PostApiPromptsByIdVersionsBody:
|
18
|
+
"""
|
19
|
+
Attributes:
|
20
|
+
project_id (str):
|
21
|
+
config_id (str):
|
22
|
+
schema_version (Literal['1.0']):
|
23
|
+
commit_message (str):
|
24
|
+
version (float):
|
25
|
+
config_data (PostApiPromptsByIdVersionsBodyConfigData):
|
26
|
+
id (Union[Unset, str]):
|
27
|
+
author_id (Union[None, Unset, str]):
|
28
|
+
created_at (Union[Unset, str]):
|
29
|
+
"""
|
30
|
+
|
31
|
+
project_id: str
|
32
|
+
config_id: str
|
33
|
+
schema_version: Literal["1.0"]
|
34
|
+
commit_message: str
|
35
|
+
version: float
|
36
|
+
config_data: "PostApiPromptsByIdVersionsBodyConfigData"
|
37
|
+
id: Union[Unset, str] = UNSET
|
38
|
+
author_id: Union[None, Unset, str] = UNSET
|
39
|
+
created_at: Union[Unset, str] = UNSET
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
41
|
+
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
43
|
+
project_id = self.project_id
|
44
|
+
|
45
|
+
config_id = self.config_id
|
46
|
+
|
47
|
+
schema_version = self.schema_version
|
48
|
+
|
49
|
+
commit_message = self.commit_message
|
50
|
+
|
51
|
+
version = self.version
|
52
|
+
|
53
|
+
config_data = self.config_data.to_dict()
|
54
|
+
|
55
|
+
id = self.id
|
56
|
+
|
57
|
+
author_id: Union[None, Unset, str]
|
58
|
+
if isinstance(self.author_id, Unset):
|
59
|
+
author_id = UNSET
|
60
|
+
else:
|
61
|
+
author_id = self.author_id
|
62
|
+
|
63
|
+
created_at = self.created_at
|
64
|
+
|
65
|
+
field_dict: dict[str, Any] = {}
|
66
|
+
field_dict.update(self.additional_properties)
|
67
|
+
field_dict.update(
|
68
|
+
{
|
69
|
+
"projectId": project_id,
|
70
|
+
"configId": config_id,
|
71
|
+
"schemaVersion": schema_version,
|
72
|
+
"commitMessage": commit_message,
|
73
|
+
"version": version,
|
74
|
+
"configData": config_data,
|
75
|
+
}
|
76
|
+
)
|
77
|
+
if id is not UNSET:
|
78
|
+
field_dict["id"] = id
|
79
|
+
if author_id is not UNSET:
|
80
|
+
field_dict["authorId"] = author_id
|
81
|
+
if created_at is not UNSET:
|
82
|
+
field_dict["createdAt"] = created_at
|
83
|
+
|
84
|
+
return field_dict
|
85
|
+
|
86
|
+
@classmethod
|
87
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
88
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data import PostApiPromptsByIdVersionsBodyConfigData
|
89
|
+
|
90
|
+
d = dict(src_dict)
|
91
|
+
project_id = d.pop("projectId")
|
92
|
+
|
93
|
+
config_id = d.pop("configId")
|
94
|
+
|
95
|
+
schema_version = cast(Literal["1.0"], d.pop("schemaVersion"))
|
96
|
+
if schema_version != "1.0":
|
97
|
+
raise ValueError(f"schemaVersion must match const '1.0', got '{schema_version}'")
|
98
|
+
|
99
|
+
commit_message = d.pop("commitMessage")
|
100
|
+
|
101
|
+
version = d.pop("version")
|
102
|
+
|
103
|
+
config_data = PostApiPromptsByIdVersionsBodyConfigData.from_dict(d.pop("configData"))
|
104
|
+
|
105
|
+
id = d.pop("id", UNSET)
|
106
|
+
|
107
|
+
def _parse_author_id(data: object) -> Union[None, Unset, str]:
|
108
|
+
if data is None:
|
109
|
+
return data
|
110
|
+
if isinstance(data, Unset):
|
111
|
+
return data
|
112
|
+
return cast(Union[None, Unset, str], data)
|
113
|
+
|
114
|
+
author_id = _parse_author_id(d.pop("authorId", UNSET))
|
115
|
+
|
116
|
+
created_at = d.pop("createdAt", UNSET)
|
117
|
+
|
118
|
+
post_api_prompts_by_id_versions_body = cls(
|
119
|
+
project_id=project_id,
|
120
|
+
config_id=config_id,
|
121
|
+
schema_version=schema_version,
|
122
|
+
commit_message=commit_message,
|
123
|
+
version=version,
|
124
|
+
config_data=config_data,
|
125
|
+
id=id,
|
126
|
+
author_id=author_id,
|
127
|
+
created_at=created_at,
|
128
|
+
)
|
129
|
+
|
130
|
+
post_api_prompts_by_id_versions_body.additional_properties = d
|
131
|
+
return post_api_prompts_by_id_versions_body
|
132
|
+
|
133
|
+
@property
|
134
|
+
def additional_keys(self) -> list[str]:
|
135
|
+
return list(self.additional_properties.keys())
|
136
|
+
|
137
|
+
def __getitem__(self, key: str) -> Any:
|
138
|
+
return self.additional_properties[key]
|
139
|
+
|
140
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
141
|
+
self.additional_properties[key] = value
|
142
|
+
|
143
|
+
def __delitem__(self, key: str) -> None:
|
144
|
+
del self.additional_properties[key]
|
145
|
+
|
146
|
+
def __contains__(self, key: str) -> bool:
|
147
|
+
return key in self.additional_properties
|
@@ -0,0 +1,207 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
3
|
+
|
4
|
+
from attrs import define as _attrs_define
|
5
|
+
from attrs import field as _attrs_field
|
6
|
+
|
7
|
+
from ..types import UNSET, Unset
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_demonstrations import (
|
11
|
+
PostApiPromptsByIdVersionsBodyConfigDataDemonstrations,
|
12
|
+
)
|
13
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_inputs_item import (
|
14
|
+
PostApiPromptsByIdVersionsBodyConfigDataInputsItem,
|
15
|
+
)
|
16
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_messages_item import (
|
17
|
+
PostApiPromptsByIdVersionsBodyConfigDataMessagesItem,
|
18
|
+
)
|
19
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_outputs_item import (
|
20
|
+
PostApiPromptsByIdVersionsBodyConfigDataOutputsItem,
|
21
|
+
)
|
22
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_prompting_technique import (
|
23
|
+
PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique,
|
24
|
+
)
|
25
|
+
|
26
|
+
|
27
|
+
T = TypeVar("T", bound="PostApiPromptsByIdVersionsBodyConfigData")
|
28
|
+
|
29
|
+
|
30
|
+
@_attrs_define
|
31
|
+
class PostApiPromptsByIdVersionsBodyConfigData:
|
32
|
+
"""
|
33
|
+
Attributes:
|
34
|
+
prompt (str):
|
35
|
+
inputs (list['PostApiPromptsByIdVersionsBodyConfigDataInputsItem']):
|
36
|
+
outputs (list['PostApiPromptsByIdVersionsBodyConfigDataOutputsItem']):
|
37
|
+
model (str):
|
38
|
+
demonstrations (PostApiPromptsByIdVersionsBodyConfigDataDemonstrations):
|
39
|
+
version (Union[Unset, float]):
|
40
|
+
messages (Union[Unset, list['PostApiPromptsByIdVersionsBodyConfigDataMessagesItem']]):
|
41
|
+
temperature (Union[Unset, float]):
|
42
|
+
max_tokens (Union[Unset, float]):
|
43
|
+
prompting_technique (Union[Unset, PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique]):
|
44
|
+
"""
|
45
|
+
|
46
|
+
prompt: str
|
47
|
+
inputs: list["PostApiPromptsByIdVersionsBodyConfigDataInputsItem"]
|
48
|
+
outputs: list["PostApiPromptsByIdVersionsBodyConfigDataOutputsItem"]
|
49
|
+
model: str
|
50
|
+
demonstrations: "PostApiPromptsByIdVersionsBodyConfigDataDemonstrations"
|
51
|
+
version: Union[Unset, float] = UNSET
|
52
|
+
messages: Union[Unset, list["PostApiPromptsByIdVersionsBodyConfigDataMessagesItem"]] = UNSET
|
53
|
+
temperature: Union[Unset, float] = UNSET
|
54
|
+
max_tokens: Union[Unset, float] = UNSET
|
55
|
+
prompting_technique: Union[Unset, "PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique"] = UNSET
|
56
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
57
|
+
|
58
|
+
def to_dict(self) -> dict[str, Any]:
|
59
|
+
prompt = self.prompt
|
60
|
+
|
61
|
+
inputs = []
|
62
|
+
for inputs_item_data in self.inputs:
|
63
|
+
inputs_item = inputs_item_data.to_dict()
|
64
|
+
inputs.append(inputs_item)
|
65
|
+
|
66
|
+
outputs = []
|
67
|
+
for outputs_item_data in self.outputs:
|
68
|
+
outputs_item = outputs_item_data.to_dict()
|
69
|
+
outputs.append(outputs_item)
|
70
|
+
|
71
|
+
model = self.model
|
72
|
+
|
73
|
+
demonstrations = self.demonstrations.to_dict()
|
74
|
+
|
75
|
+
version = self.version
|
76
|
+
|
77
|
+
messages: Union[Unset, list[dict[str, Any]]] = UNSET
|
78
|
+
if not isinstance(self.messages, Unset):
|
79
|
+
messages = []
|
80
|
+
for messages_item_data in self.messages:
|
81
|
+
messages_item = messages_item_data.to_dict()
|
82
|
+
messages.append(messages_item)
|
83
|
+
|
84
|
+
temperature = self.temperature
|
85
|
+
|
86
|
+
max_tokens = self.max_tokens
|
87
|
+
|
88
|
+
prompting_technique: Union[Unset, dict[str, Any]] = UNSET
|
89
|
+
if not isinstance(self.prompting_technique, Unset):
|
90
|
+
prompting_technique = self.prompting_technique.to_dict()
|
91
|
+
|
92
|
+
field_dict: dict[str, Any] = {}
|
93
|
+
field_dict.update(self.additional_properties)
|
94
|
+
field_dict.update(
|
95
|
+
{
|
96
|
+
"prompt": prompt,
|
97
|
+
"inputs": inputs,
|
98
|
+
"outputs": outputs,
|
99
|
+
"model": model,
|
100
|
+
"demonstrations": demonstrations,
|
101
|
+
}
|
102
|
+
)
|
103
|
+
if version is not UNSET:
|
104
|
+
field_dict["version"] = version
|
105
|
+
if messages is not UNSET:
|
106
|
+
field_dict["messages"] = messages
|
107
|
+
if temperature is not UNSET:
|
108
|
+
field_dict["temperature"] = temperature
|
109
|
+
if max_tokens is not UNSET:
|
110
|
+
field_dict["max_tokens"] = max_tokens
|
111
|
+
if prompting_technique is not UNSET:
|
112
|
+
field_dict["prompting_technique"] = prompting_technique
|
113
|
+
|
114
|
+
return field_dict
|
115
|
+
|
116
|
+
@classmethod
|
117
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
118
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_demonstrations import (
|
119
|
+
PostApiPromptsByIdVersionsBodyConfigDataDemonstrations,
|
120
|
+
)
|
121
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_inputs_item import (
|
122
|
+
PostApiPromptsByIdVersionsBodyConfigDataInputsItem,
|
123
|
+
)
|
124
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_messages_item import (
|
125
|
+
PostApiPromptsByIdVersionsBodyConfigDataMessagesItem,
|
126
|
+
)
|
127
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_outputs_item import (
|
128
|
+
PostApiPromptsByIdVersionsBodyConfigDataOutputsItem,
|
129
|
+
)
|
130
|
+
from ..models.post_api_prompts_by_id_versions_body_config_data_prompting_technique import (
|
131
|
+
PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique,
|
132
|
+
)
|
133
|
+
|
134
|
+
d = dict(src_dict)
|
135
|
+
prompt = d.pop("prompt")
|
136
|
+
|
137
|
+
inputs = []
|
138
|
+
_inputs = d.pop("inputs")
|
139
|
+
for inputs_item_data in _inputs:
|
140
|
+
inputs_item = PostApiPromptsByIdVersionsBodyConfigDataInputsItem.from_dict(inputs_item_data)
|
141
|
+
|
142
|
+
inputs.append(inputs_item)
|
143
|
+
|
144
|
+
outputs = []
|
145
|
+
_outputs = d.pop("outputs")
|
146
|
+
for outputs_item_data in _outputs:
|
147
|
+
outputs_item = PostApiPromptsByIdVersionsBodyConfigDataOutputsItem.from_dict(outputs_item_data)
|
148
|
+
|
149
|
+
outputs.append(outputs_item)
|
150
|
+
|
151
|
+
model = d.pop("model")
|
152
|
+
|
153
|
+
demonstrations = PostApiPromptsByIdVersionsBodyConfigDataDemonstrations.from_dict(d.pop("demonstrations"))
|
154
|
+
|
155
|
+
version = d.pop("version", UNSET)
|
156
|
+
|
157
|
+
messages = []
|
158
|
+
_messages = d.pop("messages", UNSET)
|
159
|
+
for messages_item_data in _messages or []:
|
160
|
+
messages_item = PostApiPromptsByIdVersionsBodyConfigDataMessagesItem.from_dict(messages_item_data)
|
161
|
+
|
162
|
+
messages.append(messages_item)
|
163
|
+
|
164
|
+
temperature = d.pop("temperature", UNSET)
|
165
|
+
|
166
|
+
max_tokens = d.pop("max_tokens", UNSET)
|
167
|
+
|
168
|
+
_prompting_technique = d.pop("prompting_technique", UNSET)
|
169
|
+
prompting_technique: Union[Unset, PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique]
|
170
|
+
if isinstance(_prompting_technique, Unset):
|
171
|
+
prompting_technique = UNSET
|
172
|
+
else:
|
173
|
+
prompting_technique = PostApiPromptsByIdVersionsBodyConfigDataPromptingTechnique.from_dict(
|
174
|
+
_prompting_technique
|
175
|
+
)
|
176
|
+
|
177
|
+
post_api_prompts_by_id_versions_body_config_data = cls(
|
178
|
+
prompt=prompt,
|
179
|
+
inputs=inputs,
|
180
|
+
outputs=outputs,
|
181
|
+
model=model,
|
182
|
+
demonstrations=demonstrations,
|
183
|
+
version=version,
|
184
|
+
messages=messages,
|
185
|
+
temperature=temperature,
|
186
|
+
max_tokens=max_tokens,
|
187
|
+
prompting_technique=prompting_technique,
|
188
|
+
)
|
189
|
+
|
190
|
+
post_api_prompts_by_id_versions_body_config_data.additional_properties = d
|
191
|
+
return post_api_prompts_by_id_versions_body_config_data
|
192
|
+
|
193
|
+
@property
|
194
|
+
def additional_keys(self) -> list[str]:
|
195
|
+
return list(self.additional_properties.keys())
|
196
|
+
|
197
|
+
def __getitem__(self, key: str) -> Any:
|
198
|
+
return self.additional_properties[key]
|
199
|
+
|
200
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
201
|
+
self.additional_properties[key] = value
|
202
|
+
|
203
|
+
def __delitem__(self, key: str) -> None:
|
204
|
+
del self.additional_properties[key]
|
205
|
+
|
206
|
+
def __contains__(self, key: str) -> bool:
|
207
|
+
return key in self.additional_properties
|