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,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="GetApiTraceIdResponse200SpansItemOutputValueItem")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiTraceIdResponse200SpansItemOutputValueItem:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
role (Union[Unset, str]): Example: assistant.
|
17
|
+
content (Union[Unset, str]): Example: Hey there! 👋😊.
|
18
|
+
"""
|
19
|
+
|
20
|
+
role: Union[Unset, str] = UNSET
|
21
|
+
content: 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
|
+
role = self.role
|
26
|
+
|
27
|
+
content = self.content
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if role is not UNSET:
|
33
|
+
field_dict["role"] = role
|
34
|
+
if content is not UNSET:
|
35
|
+
field_dict["content"] = content
|
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
|
+
role = d.pop("role", UNSET)
|
43
|
+
|
44
|
+
content = d.pop("content", UNSET)
|
45
|
+
|
46
|
+
get_api_trace_id_response_200_spans_item_output_value_item = cls(
|
47
|
+
role=role,
|
48
|
+
content=content,
|
49
|
+
)
|
50
|
+
|
51
|
+
get_api_trace_id_response_200_spans_item_output_value_item.additional_properties = d
|
52
|
+
return get_api_trace_id_response_200_spans_item_output_value_item
|
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,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="GetApiTraceIdResponse200SpansItemParams")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiTraceIdResponse200SpansItemParams:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
stream (Union[Unset, bool]): Example: True.
|
17
|
+
temperature (Union[Unset, float]): Example: 1.
|
18
|
+
"""
|
19
|
+
|
20
|
+
stream: Union[Unset, bool] = UNSET
|
21
|
+
temperature: Union[Unset, float] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
stream = self.stream
|
26
|
+
|
27
|
+
temperature = self.temperature
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if stream is not UNSET:
|
33
|
+
field_dict["stream"] = stream
|
34
|
+
if temperature is not UNSET:
|
35
|
+
field_dict["temperature"] = temperature
|
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
|
+
stream = d.pop("stream", UNSET)
|
43
|
+
|
44
|
+
temperature = d.pop("temperature", UNSET)
|
45
|
+
|
46
|
+
get_api_trace_id_response_200_spans_item_params = cls(
|
47
|
+
stream=stream,
|
48
|
+
temperature=temperature,
|
49
|
+
)
|
50
|
+
|
51
|
+
get_api_trace_id_response_200_spans_item_params.additional_properties = d
|
52
|
+
return get_api_trace_id_response_200_spans_item_params
|
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,95 @@
|
|
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="GetApiTraceIdResponse200SpansItemTimestamps")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiTraceIdResponse200SpansItemTimestamps:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
finished_at (Union[Unset, int]): Example: 1721382488392.
|
17
|
+
updated_at (Union[Unset, int]): Example: 1721382492027.
|
18
|
+
started_at (Union[Unset, int]): Example: 1721382486895.
|
19
|
+
first_token_at (Union[Unset, int]): Example: 1721382488317.
|
20
|
+
inserted_at (Union[Unset, int]): Example: 1721382492027.
|
21
|
+
"""
|
22
|
+
|
23
|
+
finished_at: Union[Unset, int] = UNSET
|
24
|
+
updated_at: Union[Unset, int] = UNSET
|
25
|
+
started_at: Union[Unset, int] = UNSET
|
26
|
+
first_token_at: Union[Unset, int] = UNSET
|
27
|
+
inserted_at: Union[Unset, int] = UNSET
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
29
|
+
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
31
|
+
finished_at = self.finished_at
|
32
|
+
|
33
|
+
updated_at = self.updated_at
|
34
|
+
|
35
|
+
started_at = self.started_at
|
36
|
+
|
37
|
+
first_token_at = self.first_token_at
|
38
|
+
|
39
|
+
inserted_at = self.inserted_at
|
40
|
+
|
41
|
+
field_dict: dict[str, Any] = {}
|
42
|
+
field_dict.update(self.additional_properties)
|
43
|
+
field_dict.update({})
|
44
|
+
if finished_at is not UNSET:
|
45
|
+
field_dict["finished_at"] = finished_at
|
46
|
+
if updated_at is not UNSET:
|
47
|
+
field_dict["updated_at"] = updated_at
|
48
|
+
if started_at is not UNSET:
|
49
|
+
field_dict["started_at"] = started_at
|
50
|
+
if first_token_at is not UNSET:
|
51
|
+
field_dict["first_token_at"] = first_token_at
|
52
|
+
if inserted_at is not UNSET:
|
53
|
+
field_dict["inserted_at"] = inserted_at
|
54
|
+
|
55
|
+
return field_dict
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
59
|
+
d = dict(src_dict)
|
60
|
+
finished_at = d.pop("finished_at", UNSET)
|
61
|
+
|
62
|
+
updated_at = d.pop("updated_at", UNSET)
|
63
|
+
|
64
|
+
started_at = d.pop("started_at", UNSET)
|
65
|
+
|
66
|
+
first_token_at = d.pop("first_token_at", UNSET)
|
67
|
+
|
68
|
+
inserted_at = d.pop("inserted_at", UNSET)
|
69
|
+
|
70
|
+
get_api_trace_id_response_200_spans_item_timestamps = cls(
|
71
|
+
finished_at=finished_at,
|
72
|
+
updated_at=updated_at,
|
73
|
+
started_at=started_at,
|
74
|
+
first_token_at=first_token_at,
|
75
|
+
inserted_at=inserted_at,
|
76
|
+
)
|
77
|
+
|
78
|
+
get_api_trace_id_response_200_spans_item_timestamps.additional_properties = d
|
79
|
+
return get_api_trace_id_response_200_spans_item_timestamps
|
80
|
+
|
81
|
+
@property
|
82
|
+
def additional_keys(self) -> list[str]:
|
83
|
+
return list(self.additional_properties.keys())
|
84
|
+
|
85
|
+
def __getitem__(self, key: str) -> Any:
|
86
|
+
return self.additional_properties[key]
|
87
|
+
|
88
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
89
|
+
self.additional_properties[key] = value
|
90
|
+
|
91
|
+
def __delitem__(self, key: str) -> None:
|
92
|
+
del self.additional_properties[key]
|
93
|
+
|
94
|
+
def __contains__(self, key: str) -> bool:
|
95
|
+
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="GetApiTraceIdResponse200Timestamps")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class GetApiTraceIdResponse200Timestamps:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
started_at (Union[Unset, int]): Example: 1721382486868.
|
17
|
+
inserted_at (Union[Unset, int]): Example: 1721382492894.
|
18
|
+
updated_at (Union[Unset, int]): Example: 1721382492894.
|
19
|
+
"""
|
20
|
+
|
21
|
+
started_at: Union[Unset, int] = UNSET
|
22
|
+
inserted_at: Union[Unset, int] = UNSET
|
23
|
+
updated_at: Union[Unset, int] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
started_at = self.started_at
|
28
|
+
|
29
|
+
inserted_at = self.inserted_at
|
30
|
+
|
31
|
+
updated_at = self.updated_at
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if started_at is not UNSET:
|
37
|
+
field_dict["started_at"] = started_at
|
38
|
+
if inserted_at is not UNSET:
|
39
|
+
field_dict["inserted_at"] = inserted_at
|
40
|
+
if updated_at is not UNSET:
|
41
|
+
field_dict["updated_at"] = updated_at
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
47
|
+
d = dict(src_dict)
|
48
|
+
started_at = d.pop("started_at", UNSET)
|
49
|
+
|
50
|
+
inserted_at = d.pop("inserted_at", UNSET)
|
51
|
+
|
52
|
+
updated_at = d.pop("updated_at", UNSET)
|
53
|
+
|
54
|
+
get_api_trace_id_response_200_timestamps = cls(
|
55
|
+
started_at=started_at,
|
56
|
+
inserted_at=inserted_at,
|
57
|
+
updated_at=updated_at,
|
58
|
+
)
|
59
|
+
|
60
|
+
get_api_trace_id_response_200_timestamps.additional_properties = d
|
61
|
+
return get_api_trace_id_response_200_timestamps
|
62
|
+
|
63
|
+
@property
|
64
|
+
def additional_keys(self) -> list[str]:
|
65
|
+
return list(self.additional_properties.keys())
|
66
|
+
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
68
|
+
return self.additional_properties[key]
|
69
|
+
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
71
|
+
self.additional_properties[key] = value
|
72
|
+
|
73
|
+
def __delitem__(self, key: str) -> None:
|
74
|
+
del self.additional_properties[key]
|
75
|
+
|
76
|
+
def __contains__(self, key: str) -> bool:
|
77
|
+
return key in self.additional_properties
|
@@ -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="Input")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Input:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
value (Union[Unset, str]):
|
17
|
+
satisfaction_score (Union[Unset, float]):
|
18
|
+
"""
|
19
|
+
|
20
|
+
value: Union[Unset, str] = UNSET
|
21
|
+
satisfaction_score: Union[Unset, float] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
value = self.value
|
26
|
+
|
27
|
+
satisfaction_score = self.satisfaction_score
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if value is not UNSET:
|
33
|
+
field_dict["value"] = value
|
34
|
+
if satisfaction_score is not UNSET:
|
35
|
+
field_dict["satisfaction_score"] = satisfaction_score
|
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
|
+
value = d.pop("value", UNSET)
|
43
|
+
|
44
|
+
satisfaction_score = d.pop("satisfaction_score", UNSET)
|
45
|
+
|
46
|
+
input_ = cls(
|
47
|
+
value=value,
|
48
|
+
satisfaction_score=satisfaction_score,
|
49
|
+
)
|
50
|
+
|
51
|
+
input_.additional_properties = d
|
52
|
+
return input_
|
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,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="Metadata")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Metadata:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
sdk_language (Union[Unset, str]):
|
17
|
+
sdk_version (Union[Unset, str]):
|
18
|
+
"""
|
19
|
+
|
20
|
+
sdk_language: Union[Unset, str] = UNSET
|
21
|
+
sdk_version: 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
|
+
sdk_language = self.sdk_language
|
26
|
+
|
27
|
+
sdk_version = self.sdk_version
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if sdk_language is not UNSET:
|
33
|
+
field_dict["sdk_language"] = sdk_language
|
34
|
+
if sdk_version is not UNSET:
|
35
|
+
field_dict["sdk_version"] = sdk_version
|
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
|
+
sdk_language = d.pop("sdk_language", UNSET)
|
43
|
+
|
44
|
+
sdk_version = d.pop("sdk_version", UNSET)
|
45
|
+
|
46
|
+
metadata = cls(
|
47
|
+
sdk_language=sdk_language,
|
48
|
+
sdk_version=sdk_version,
|
49
|
+
)
|
50
|
+
|
51
|
+
metadata.additional_properties = d
|
52
|
+
return metadata
|
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,115 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Any, 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
|
+
T = TypeVar("T", bound="Metrics")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Metrics:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
tokens_estimated (Union[Unset, bool]):
|
17
|
+
completion_tokens (Union[Unset, int]):
|
18
|
+
prompt_tokens (Union[Unset, int]):
|
19
|
+
total_cost (Union[Unset, float]):
|
20
|
+
total_time_ms (Union[Unset, int]):
|
21
|
+
first_token_ms (Union[None, Unset, int]):
|
22
|
+
"""
|
23
|
+
|
24
|
+
tokens_estimated: Union[Unset, bool] = UNSET
|
25
|
+
completion_tokens: Union[Unset, int] = UNSET
|
26
|
+
prompt_tokens: Union[Unset, int] = UNSET
|
27
|
+
total_cost: Union[Unset, float] = UNSET
|
28
|
+
total_time_ms: Union[Unset, int] = UNSET
|
29
|
+
first_token_ms: Union[None, Unset, int] = UNSET
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
|
+
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
33
|
+
tokens_estimated = self.tokens_estimated
|
34
|
+
|
35
|
+
completion_tokens = self.completion_tokens
|
36
|
+
|
37
|
+
prompt_tokens = self.prompt_tokens
|
38
|
+
|
39
|
+
total_cost = self.total_cost
|
40
|
+
|
41
|
+
total_time_ms = self.total_time_ms
|
42
|
+
|
43
|
+
first_token_ms: Union[None, Unset, int]
|
44
|
+
if isinstance(self.first_token_ms, Unset):
|
45
|
+
first_token_ms = UNSET
|
46
|
+
else:
|
47
|
+
first_token_ms = self.first_token_ms
|
48
|
+
|
49
|
+
field_dict: dict[str, Any] = {}
|
50
|
+
field_dict.update(self.additional_properties)
|
51
|
+
field_dict.update({})
|
52
|
+
if tokens_estimated is not UNSET:
|
53
|
+
field_dict["tokens_estimated"] = tokens_estimated
|
54
|
+
if completion_tokens is not UNSET:
|
55
|
+
field_dict["completion_tokens"] = completion_tokens
|
56
|
+
if prompt_tokens is not UNSET:
|
57
|
+
field_dict["prompt_tokens"] = prompt_tokens
|
58
|
+
if total_cost is not UNSET:
|
59
|
+
field_dict["total_cost"] = total_cost
|
60
|
+
if total_time_ms is not UNSET:
|
61
|
+
field_dict["total_time_ms"] = total_time_ms
|
62
|
+
if first_token_ms is not UNSET:
|
63
|
+
field_dict["first_token_ms"] = first_token_ms
|
64
|
+
|
65
|
+
return field_dict
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
69
|
+
d = dict(src_dict)
|
70
|
+
tokens_estimated = d.pop("tokens_estimated", UNSET)
|
71
|
+
|
72
|
+
completion_tokens = d.pop("completion_tokens", UNSET)
|
73
|
+
|
74
|
+
prompt_tokens = d.pop("prompt_tokens", UNSET)
|
75
|
+
|
76
|
+
total_cost = d.pop("total_cost", UNSET)
|
77
|
+
|
78
|
+
total_time_ms = d.pop("total_time_ms", UNSET)
|
79
|
+
|
80
|
+
def _parse_first_token_ms(data: object) -> Union[None, Unset, int]:
|
81
|
+
if data is None:
|
82
|
+
return data
|
83
|
+
if isinstance(data, Unset):
|
84
|
+
return data
|
85
|
+
return cast(Union[None, Unset, int], data)
|
86
|
+
|
87
|
+
first_token_ms = _parse_first_token_ms(d.pop("first_token_ms", UNSET))
|
88
|
+
|
89
|
+
metrics = cls(
|
90
|
+
tokens_estimated=tokens_estimated,
|
91
|
+
completion_tokens=completion_tokens,
|
92
|
+
prompt_tokens=prompt_tokens,
|
93
|
+
total_cost=total_cost,
|
94
|
+
total_time_ms=total_time_ms,
|
95
|
+
first_token_ms=first_token_ms,
|
96
|
+
)
|
97
|
+
|
98
|
+
metrics.additional_properties = d
|
99
|
+
return metrics
|
100
|
+
|
101
|
+
@property
|
102
|
+
def additional_keys(self) -> list[str]:
|
103
|
+
return list(self.additional_properties.keys())
|
104
|
+
|
105
|
+
def __getitem__(self, key: str) -> Any:
|
106
|
+
return self.additional_properties[key]
|
107
|
+
|
108
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
109
|
+
self.additional_properties[key] = value
|
110
|
+
|
111
|
+
def __delitem__(self, key: str) -> None:
|
112
|
+
del self.additional_properties[key]
|
113
|
+
|
114
|
+
def __contains__(self, key: str) -> bool:
|
115
|
+
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="Output")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Output:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
value (Union[Unset, str]):
|
17
|
+
"""
|
18
|
+
|
19
|
+
value: 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
|
+
value = self.value
|
24
|
+
|
25
|
+
field_dict: dict[str, Any] = {}
|
26
|
+
field_dict.update(self.additional_properties)
|
27
|
+
field_dict.update({})
|
28
|
+
if value is not UNSET:
|
29
|
+
field_dict["value"] = value
|
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
|
+
value = d.pop("value", UNSET)
|
37
|
+
|
38
|
+
output = cls(
|
39
|
+
value=value,
|
40
|
+
)
|
41
|
+
|
42
|
+
output.additional_properties = d
|
43
|
+
return output
|
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,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="Pagination")
|
10
|
+
|
11
|
+
|
12
|
+
@_attrs_define
|
13
|
+
class Pagination:
|
14
|
+
"""
|
15
|
+
Attributes:
|
16
|
+
scroll_id (Union[Unset, str]): Example: 123.
|
17
|
+
total_hits (Union[Unset, int]): Example: 1254.
|
18
|
+
"""
|
19
|
+
|
20
|
+
scroll_id: Union[Unset, str] = UNSET
|
21
|
+
total_hits: Union[Unset, int] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
scroll_id = self.scroll_id
|
26
|
+
|
27
|
+
total_hits = self.total_hits
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if scroll_id is not UNSET:
|
33
|
+
field_dict["scrollId"] = scroll_id
|
34
|
+
if total_hits is not UNSET:
|
35
|
+
field_dict["totalHits"] = total_hits
|
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
|
+
scroll_id = d.pop("scrollId", UNSET)
|
43
|
+
|
44
|
+
total_hits = d.pop("totalHits", UNSET)
|
45
|
+
|
46
|
+
pagination = cls(
|
47
|
+
scroll_id=scroll_id,
|
48
|
+
total_hits=total_hits,
|
49
|
+
)
|
50
|
+
|
51
|
+
pagination.additional_properties = d
|
52
|
+
return pagination
|
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
|