agentinsight-sdk 0.1.0__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.
- agentinsight/__init__.py +118 -0
- agentinsight/_client/attributes.py +250 -0
- agentinsight/_client/client.py +3864 -0
- agentinsight/_client/config.py +31 -0
- agentinsight/_client/constants.py +65 -0
- agentinsight/_client/datasets.py +302 -0
- agentinsight/_client/environment_variables.py +160 -0
- agentinsight/_client/exceptions.py +22 -0
- agentinsight/_client/get_client.py +146 -0
- agentinsight/_client/observe.py +759 -0
- agentinsight/_client/propagation.py +513 -0
- agentinsight/_client/resource_manager.py +503 -0
- agentinsight/_client/span.py +1551 -0
- agentinsight/_client/span_filter.py +81 -0
- agentinsight/_client/span_processor.py +210 -0
- agentinsight/_client/utils.py +134 -0
- agentinsight/_task_manager/media_manager.py +346 -0
- agentinsight/_task_manager/media_upload_consumer.py +44 -0
- agentinsight/_task_manager/media_upload_queue.py +12 -0
- agentinsight/_task_manager/score_ingestion_consumer.py +189 -0
- agentinsight/_utils/__init__.py +19 -0
- agentinsight/_utils/environment.py +34 -0
- agentinsight/_utils/error_logging.py +47 -0
- agentinsight/_utils/parse_error.py +99 -0
- agentinsight/_utils/prompt_cache.py +231 -0
- agentinsight/_utils/request.py +138 -0
- agentinsight/_utils/serializer.py +205 -0
- agentinsight/_version.py +13 -0
- agentinsight/api/.fern/metadata.json +14 -0
- agentinsight/api/__init__.py +854 -0
- agentinsight/api/annotation_queues/__init__.py +82 -0
- agentinsight/api/annotation_queues/client.py +1111 -0
- agentinsight/api/annotation_queues/raw_client.py +2288 -0
- agentinsight/api/annotation_queues/types/__init__.py +84 -0
- agentinsight/api/annotation_queues/types/annotation_queue.py +28 -0
- agentinsight/api/annotation_queues/types/annotation_queue_assignment_request.py +16 -0
- agentinsight/api/annotation_queues/types/annotation_queue_item.py +34 -0
- agentinsight/api/annotation_queues/types/annotation_queue_object_type.py +26 -0
- agentinsight/api/annotation_queues/types/annotation_queue_status.py +22 -0
- agentinsight/api/annotation_queues/types/create_annotation_queue_assignment_response.py +18 -0
- agentinsight/api/annotation_queues/types/create_annotation_queue_item_request.py +25 -0
- agentinsight/api/annotation_queues/types/create_annotation_queue_request.py +20 -0
- agentinsight/api/annotation_queues/types/delete_annotation_queue_assignment_response.py +14 -0
- agentinsight/api/annotation_queues/types/delete_annotation_queue_item_response.py +15 -0
- agentinsight/api/annotation_queues/types/paginated_annotation_queue_items.py +17 -0
- agentinsight/api/annotation_queues/types/paginated_annotation_queues.py +17 -0
- agentinsight/api/annotation_queues/types/update_annotation_queue_item_request.py +15 -0
- agentinsight/api/blob_storage_integrations/__init__.py +73 -0
- agentinsight/api/blob_storage_integrations/client.py +560 -0
- agentinsight/api/blob_storage_integrations/raw_client.py +986 -0
- agentinsight/api/blob_storage_integrations/types/__init__.py +77 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_export_frequency.py +26 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_export_mode.py +26 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_integration_deletion_response.py +14 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_integration_file_type.py +26 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_integration_response.py +65 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_integration_status_response.py +50 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_integration_type.py +26 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_integrations_response.py +15 -0
- agentinsight/api/blob_storage_integrations/types/blob_storage_sync_status.py +47 -0
- agentinsight/api/blob_storage_integrations/types/create_blob_storage_integration_request.py +96 -0
- agentinsight/api/client.py +679 -0
- agentinsight/api/comments/__init__.py +44 -0
- agentinsight/api/comments/client.py +407 -0
- agentinsight/api/comments/raw_client.py +750 -0
- agentinsight/api/comments/types/__init__.py +46 -0
- agentinsight/api/comments/types/create_comment_request.py +47 -0
- agentinsight/api/comments/types/create_comment_response.py +17 -0
- agentinsight/api/comments/types/get_comments_response.py +17 -0
- agentinsight/api/commons/__init__.py +222 -0
- agentinsight/api/commons/errors/__init__.py +56 -0
- agentinsight/api/commons/errors/access_denied_error.py +12 -0
- agentinsight/api/commons/errors/error.py +12 -0
- agentinsight/api/commons/errors/method_not_allowed_error.py +12 -0
- agentinsight/api/commons/errors/not_found_error.py +12 -0
- agentinsight/api/commons/errors/unauthorized_error.py +12 -0
- agentinsight/api/commons/types/__init__.py +207 -0
- agentinsight/api/commons/types/base_score.py +90 -0
- agentinsight/api/commons/types/base_score_v1.py +70 -0
- agentinsight/api/commons/types/boolean_score.py +26 -0
- agentinsight/api/commons/types/boolean_score_v1.py +26 -0
- agentinsight/api/commons/types/categorical_score.py +26 -0
- agentinsight/api/commons/types/categorical_score_v1.py +26 -0
- agentinsight/api/commons/types/comment.py +36 -0
- agentinsight/api/commons/types/comment_object_type.py +30 -0
- agentinsight/api/commons/types/config_category.py +15 -0
- agentinsight/api/commons/types/correction_score.py +26 -0
- agentinsight/api/commons/types/create_score_value.py +5 -0
- agentinsight/api/commons/types/dataset.py +49 -0
- agentinsight/api/commons/types/dataset_item.py +58 -0
- agentinsight/api/commons/types/dataset_run.py +63 -0
- agentinsight/api/commons/types/dataset_run_item.py +40 -0
- agentinsight/api/commons/types/dataset_run_with_items.py +19 -0
- agentinsight/api/commons/types/dataset_status.py +22 -0
- agentinsight/api/commons/types/map_value.py +11 -0
- agentinsight/api/commons/types/model.py +125 -0
- agentinsight/api/commons/types/model_price.py +14 -0
- agentinsight/api/commons/types/model_usage_unit.py +42 -0
- agentinsight/api/commons/types/numeric_score.py +17 -0
- agentinsight/api/commons/types/numeric_score_v1.py +17 -0
- agentinsight/api/commons/types/observation.py +142 -0
- agentinsight/api/commons/types/observation_level.py +30 -0
- agentinsight/api/commons/types/observation_v2.py +235 -0
- agentinsight/api/commons/types/observations_view.py +89 -0
- agentinsight/api/commons/types/pricing_tier.py +91 -0
- agentinsight/api/commons/types/pricing_tier_condition.py +68 -0
- agentinsight/api/commons/types/pricing_tier_input.py +76 -0
- agentinsight/api/commons/types/pricing_tier_operator.py +42 -0
- agentinsight/api/commons/types/score.py +248 -0
- agentinsight/api/commons/types/score_config.py +66 -0
- agentinsight/api/commons/types/score_config_data_type.py +30 -0
- agentinsight/api/commons/types/score_data_type.py +34 -0
- agentinsight/api/commons/types/score_source.py +26 -0
- agentinsight/api/commons/types/score_v1.py +168 -0
- agentinsight/api/commons/types/session.py +25 -0
- agentinsight/api/commons/types/session_with_traces.py +15 -0
- agentinsight/api/commons/types/text_score.py +21 -0
- agentinsight/api/commons/types/text_score_v1.py +21 -0
- agentinsight/api/commons/types/trace.py +84 -0
- agentinsight/api/commons/types/trace_with_details.py +43 -0
- agentinsight/api/commons/types/trace_with_full_details.py +45 -0
- agentinsight/api/commons/types/usage.py +59 -0
- agentinsight/api/core/__init__.py +111 -0
- agentinsight/api/core/api_error.py +23 -0
- agentinsight/api/core/client_wrapper.py +141 -0
- agentinsight/api/core/datetime_utils.py +30 -0
- agentinsight/api/core/enum.py +20 -0
- agentinsight/api/core/file.py +70 -0
- agentinsight/api/core/force_multipart.py +18 -0
- agentinsight/api/core/http_client.py +711 -0
- agentinsight/api/core/http_response.py +55 -0
- agentinsight/api/core/http_sse/__init__.py +48 -0
- agentinsight/api/core/http_sse/_api.py +114 -0
- agentinsight/api/core/http_sse/_decoders.py +66 -0
- agentinsight/api/core/http_sse/_exceptions.py +7 -0
- agentinsight/api/core/http_sse/_models.py +17 -0
- agentinsight/api/core/jsonable_encoder.py +102 -0
- agentinsight/api/core/pydantic_utilities.py +310 -0
- agentinsight/api/core/query_encoder.py +60 -0
- agentinsight/api/core/remove_none_from_dict.py +11 -0
- agentinsight/api/core/request_options.py +35 -0
- agentinsight/api/core/serialization.py +282 -0
- agentinsight/api/dataset_items/__init__.py +52 -0
- agentinsight/api/dataset_items/client.py +499 -0
- agentinsight/api/dataset_items/raw_client.py +973 -0
- agentinsight/api/dataset_items/types/__init__.py +50 -0
- agentinsight/api/dataset_items/types/create_dataset_item_request.py +37 -0
- agentinsight/api/dataset_items/types/delete_dataset_item_response.py +17 -0
- agentinsight/api/dataset_items/types/paginated_dataset_items.py +17 -0
- agentinsight/api/dataset_run_items/__init__.py +43 -0
- agentinsight/api/dataset_run_items/client.py +333 -0
- agentinsight/api/dataset_run_items/raw_client.py +557 -0
- agentinsight/api/dataset_run_items/types/__init__.py +44 -0
- agentinsight/api/dataset_run_items/types/create_dataset_run_item_request.py +58 -0
- agentinsight/api/dataset_run_items/types/paginated_dataset_run_items.py +17 -0
- agentinsight/api/datasets/__init__.py +55 -0
- agentinsight/api/datasets/client.py +661 -0
- agentinsight/api/datasets/raw_client.py +1368 -0
- agentinsight/api/datasets/types/__init__.py +53 -0
- agentinsight/api/datasets/types/create_dataset_request.py +31 -0
- agentinsight/api/datasets/types/delete_dataset_run_response.py +14 -0
- agentinsight/api/datasets/types/paginated_dataset_runs.py +17 -0
- agentinsight/api/datasets/types/paginated_datasets.py +17 -0
- agentinsight/api/health/__init__.py +44 -0
- agentinsight/api/health/client.py +112 -0
- agentinsight/api/health/errors/__init__.py +42 -0
- agentinsight/api/health/errors/service_unavailable_error.py +13 -0
- agentinsight/api/health/raw_client.py +227 -0
- agentinsight/api/health/types/__init__.py +40 -0
- agentinsight/api/health/types/health_response.py +30 -0
- agentinsight/api/ingestion/__init__.py +169 -0
- agentinsight/api/ingestion/client.py +221 -0
- agentinsight/api/ingestion/raw_client.py +293 -0
- agentinsight/api/ingestion/types/__init__.py +169 -0
- agentinsight/api/ingestion/types/base_event.py +27 -0
- agentinsight/api/ingestion/types/create_event_body.py +14 -0
- agentinsight/api/ingestion/types/create_event_event.py +15 -0
- agentinsight/api/ingestion/types/create_generation_body.py +40 -0
- agentinsight/api/ingestion/types/create_generation_event.py +15 -0
- agentinsight/api/ingestion/types/create_observation_event.py +15 -0
- agentinsight/api/ingestion/types/create_span_body.py +19 -0
- agentinsight/api/ingestion/types/create_span_event.py +15 -0
- agentinsight/api/ingestion/types/ingestion_error.py +17 -0
- agentinsight/api/ingestion/types/ingestion_event.py +155 -0
- agentinsight/api/ingestion/types/ingestion_response.py +17 -0
- agentinsight/api/ingestion/types/ingestion_success.py +15 -0
- agentinsight/api/ingestion/types/ingestion_usage.py +8 -0
- agentinsight/api/ingestion/types/observation_body.py +53 -0
- agentinsight/api/ingestion/types/observation_type.py +54 -0
- agentinsight/api/ingestion/types/open_ai_completion_usage_schema.py +26 -0
- agentinsight/api/ingestion/types/open_ai_response_usage_schema.py +24 -0
- agentinsight/api/ingestion/types/open_ai_usage.py +28 -0
- agentinsight/api/ingestion/types/optional_observation_body.py +36 -0
- agentinsight/api/ingestion/types/score_body.py +75 -0
- agentinsight/api/ingestion/types/score_event.py +15 -0
- agentinsight/api/ingestion/types/sdk_log_body.py +14 -0
- agentinsight/api/ingestion/types/sdk_log_event.py +15 -0
- agentinsight/api/ingestion/types/trace_body.py +36 -0
- agentinsight/api/ingestion/types/trace_event.py +15 -0
- agentinsight/api/ingestion/types/update_event_body.py +14 -0
- agentinsight/api/ingestion/types/update_generation_body.py +40 -0
- agentinsight/api/ingestion/types/update_generation_event.py +15 -0
- agentinsight/api/ingestion/types/update_observation_event.py +15 -0
- agentinsight/api/ingestion/types/update_span_body.py +19 -0
- agentinsight/api/ingestion/types/update_span_event.py +15 -0
- agentinsight/api/ingestion/types/usage_details.py +10 -0
- agentinsight/api/legacy/__init__.py +61 -0
- agentinsight/api/legacy/client.py +105 -0
- agentinsight/api/legacy/metrics_v1/__init__.py +40 -0
- agentinsight/api/legacy/metrics_v1/client.py +214 -0
- agentinsight/api/legacy/metrics_v1/raw_client.py +322 -0
- agentinsight/api/legacy/metrics_v1/types/__init__.py +40 -0
- agentinsight/api/legacy/metrics_v1/types/metrics_response.py +19 -0
- agentinsight/api/legacy/observations_v1/__init__.py +43 -0
- agentinsight/api/legacy/observations_v1/client.py +523 -0
- agentinsight/api/legacy/observations_v1/raw_client.py +759 -0
- agentinsight/api/legacy/observations_v1/types/__init__.py +44 -0
- agentinsight/api/legacy/observations_v1/types/observations.py +17 -0
- agentinsight/api/legacy/observations_v1/types/observations_views.py +17 -0
- agentinsight/api/legacy/raw_client.py +13 -0
- agentinsight/api/legacy/score_v1/__init__.py +43 -0
- agentinsight/api/legacy/score_v1/client.py +329 -0
- agentinsight/api/legacy/score_v1/raw_client.py +545 -0
- agentinsight/api/legacy/score_v1/types/__init__.py +44 -0
- agentinsight/api/legacy/score_v1/types/create_score_request.py +75 -0
- agentinsight/api/legacy/score_v1/types/create_score_response.py +17 -0
- agentinsight/api/llm_connections/__init__.py +55 -0
- agentinsight/api/llm_connections/client.py +311 -0
- agentinsight/api/llm_connections/raw_client.py +541 -0
- agentinsight/api/llm_connections/types/__init__.py +53 -0
- agentinsight/api/llm_connections/types/llm_adapter.py +38 -0
- agentinsight/api/llm_connections/types/llm_connection.py +77 -0
- agentinsight/api/llm_connections/types/paginated_llm_connections.py +17 -0
- agentinsight/api/llm_connections/types/upsert_llm_connection_request.py +69 -0
- agentinsight/api/media/__init__.py +58 -0
- agentinsight/api/media/client.py +427 -0
- agentinsight/api/media/raw_client.py +739 -0
- agentinsight/api/media/types/__init__.py +56 -0
- agentinsight/api/media/types/get_media_response.py +55 -0
- agentinsight/api/media/types/get_media_upload_url_request.py +51 -0
- agentinsight/api/media/types/get_media_upload_url_response.py +28 -0
- agentinsight/api/media/types/media_content_type.py +232 -0
- agentinsight/api/media/types/patch_media_body.py +43 -0
- agentinsight/api/metrics/__init__.py +40 -0
- agentinsight/api/metrics/client.py +422 -0
- agentinsight/api/metrics/raw_client.py +530 -0
- agentinsight/api/metrics/types/__init__.py +40 -0
- agentinsight/api/metrics/types/metrics_v2response.py +19 -0
- agentinsight/api/models/__init__.py +43 -0
- agentinsight/api/models/client.py +523 -0
- agentinsight/api/models/raw_client.py +993 -0
- agentinsight/api/models/types/__init__.py +44 -0
- agentinsight/api/models/types/create_model_request.py +103 -0
- agentinsight/api/models/types/paginated_models.py +17 -0
- agentinsight/api/observations/__init__.py +43 -0
- agentinsight/api/observations/client.py +522 -0
- agentinsight/api/observations/raw_client.py +641 -0
- agentinsight/api/observations/types/__init__.py +44 -0
- agentinsight/api/observations/types/observations_v2meta.py +21 -0
- agentinsight/api/observations/types/observations_v2response.py +28 -0
- agentinsight/api/opentelemetry/__init__.py +67 -0
- agentinsight/api/opentelemetry/client.py +276 -0
- agentinsight/api/opentelemetry/raw_client.py +291 -0
- agentinsight/api/opentelemetry/types/__init__.py +65 -0
- agentinsight/api/opentelemetry/types/otel_attribute.py +27 -0
- agentinsight/api/opentelemetry/types/otel_attribute_value.py +46 -0
- agentinsight/api/opentelemetry/types/otel_resource.py +24 -0
- agentinsight/api/opentelemetry/types/otel_resource_span.py +32 -0
- agentinsight/api/opentelemetry/types/otel_scope.py +34 -0
- agentinsight/api/opentelemetry/types/otel_scope_span.py +28 -0
- agentinsight/api/opentelemetry/types/otel_span.py +76 -0
- agentinsight/api/opentelemetry/types/otel_trace_response.py +16 -0
- agentinsight/api/organizations/__init__.py +73 -0
- agentinsight/api/organizations/client.py +756 -0
- agentinsight/api/organizations/raw_client.py +1707 -0
- agentinsight/api/organizations/types/__init__.py +71 -0
- agentinsight/api/organizations/types/delete_membership_request.py +16 -0
- agentinsight/api/organizations/types/membership_deletion_response.py +17 -0
- agentinsight/api/organizations/types/membership_request.py +18 -0
- agentinsight/api/organizations/types/membership_response.py +20 -0
- agentinsight/api/organizations/types/membership_role.py +30 -0
- agentinsight/api/organizations/types/memberships_response.py +15 -0
- agentinsight/api/organizations/types/organization_api_key.py +31 -0
- agentinsight/api/organizations/types/organization_api_keys_response.py +19 -0
- agentinsight/api/organizations/types/organization_project.py +25 -0
- agentinsight/api/organizations/types/organization_projects_response.py +15 -0
- agentinsight/api/projects/__init__.py +67 -0
- agentinsight/api/projects/client.py +760 -0
- agentinsight/api/projects/raw_client.py +1577 -0
- agentinsight/api/projects/types/__init__.py +65 -0
- agentinsight/api/projects/types/api_key_deletion_response.py +18 -0
- agentinsight/api/projects/types/api_key_list.py +23 -0
- agentinsight/api/projects/types/api_key_response.py +30 -0
- agentinsight/api/projects/types/api_key_summary.py +35 -0
- agentinsight/api/projects/types/organization.py +22 -0
- agentinsight/api/projects/types/project.py +34 -0
- agentinsight/api/projects/types/project_deletion_response.py +15 -0
- agentinsight/api/projects/types/projects.py +15 -0
- agentinsight/api/prompt_version/__init__.py +4 -0
- agentinsight/api/prompt_version/client.py +157 -0
- agentinsight/api/prompt_version/raw_client.py +264 -0
- agentinsight/api/prompts/__init__.py +100 -0
- agentinsight/api/prompts/client.py +550 -0
- agentinsight/api/prompts/raw_client.py +987 -0
- agentinsight/api/prompts/types/__init__.py +96 -0
- agentinsight/api/prompts/types/base_prompt.py +42 -0
- agentinsight/api/prompts/types/chat_message.py +17 -0
- agentinsight/api/prompts/types/chat_message_type.py +15 -0
- agentinsight/api/prompts/types/chat_message_with_placeholders.py +8 -0
- agentinsight/api/prompts/types/chat_prompt.py +15 -0
- agentinsight/api/prompts/types/create_chat_prompt_request.py +37 -0
- agentinsight/api/prompts/types/create_chat_prompt_type.py +15 -0
- agentinsight/api/prompts/types/create_prompt_request.py +8 -0
- agentinsight/api/prompts/types/create_text_prompt_request.py +36 -0
- agentinsight/api/prompts/types/create_text_prompt_type.py +15 -0
- agentinsight/api/prompts/types/placeholder_message.py +16 -0
- agentinsight/api/prompts/types/placeholder_message_type.py +15 -0
- agentinsight/api/prompts/types/prompt.py +58 -0
- agentinsight/api/prompts/types/prompt_meta.py +35 -0
- agentinsight/api/prompts/types/prompt_meta_list_response.py +17 -0
- agentinsight/api/prompts/types/prompt_type.py +20 -0
- agentinsight/api/prompts/types/text_prompt.py +14 -0
- agentinsight/api/scim/__init__.py +94 -0
- agentinsight/api/scim/client.py +686 -0
- agentinsight/api/scim/raw_client.py +1528 -0
- agentinsight/api/scim/types/__init__.py +92 -0
- agentinsight/api/scim/types/authentication_scheme.py +20 -0
- agentinsight/api/scim/types/bulk_config.py +22 -0
- agentinsight/api/scim/types/empty_response.py +16 -0
- agentinsight/api/scim/types/filter_config.py +17 -0
- agentinsight/api/scim/types/resource_meta.py +17 -0
- agentinsight/api/scim/types/resource_type.py +27 -0
- agentinsight/api/scim/types/resource_types_response.py +21 -0
- agentinsight/api/scim/types/schema_extension.py +17 -0
- agentinsight/api/scim/types/schema_resource.py +19 -0
- agentinsight/api/scim/types/schemas_response.py +21 -0
- agentinsight/api/scim/types/scim_email.py +16 -0
- agentinsight/api/scim/types/scim_feature_support.py +14 -0
- agentinsight/api/scim/types/scim_name.py +14 -0
- agentinsight/api/scim/types/scim_user.py +24 -0
- agentinsight/api/scim/types/scim_users_list_response.py +25 -0
- agentinsight/api/scim/types/service_provider_config.py +36 -0
- agentinsight/api/scim/types/user_meta.py +20 -0
- agentinsight/api/score_configs/__init__.py +44 -0
- agentinsight/api/score_configs/client.py +526 -0
- agentinsight/api/score_configs/raw_client.py +1012 -0
- agentinsight/api/score_configs/types/__init__.py +46 -0
- agentinsight/api/score_configs/types/create_score_config_request.py +46 -0
- agentinsight/api/score_configs/types/score_configs.py +17 -0
- agentinsight/api/score_configs/types/update_score_config_request.py +53 -0
- agentinsight/api/scores/__init__.py +82 -0
- agentinsight/api/scores/client.py +420 -0
- agentinsight/api/scores/raw_client.py +656 -0
- agentinsight/api/scores/types/__init__.py +82 -0
- agentinsight/api/scores/types/get_scores_response.py +17 -0
- agentinsight/api/scores/types/get_scores_response_data.py +258 -0
- agentinsight/api/scores/types/get_scores_response_data_boolean.py +15 -0
- agentinsight/api/scores/types/get_scores_response_data_categorical.py +15 -0
- agentinsight/api/scores/types/get_scores_response_data_correction.py +15 -0
- agentinsight/api/scores/types/get_scores_response_data_numeric.py +15 -0
- agentinsight/api/scores/types/get_scores_response_data_text.py +15 -0
- agentinsight/api/scores/types/get_scores_response_trace_data.py +38 -0
- agentinsight/api/sessions/__init__.py +40 -0
- agentinsight/api/sessions/client.py +262 -0
- agentinsight/api/sessions/raw_client.py +500 -0
- agentinsight/api/sessions/types/__init__.py +40 -0
- agentinsight/api/sessions/types/paginated_sessions.py +17 -0
- agentinsight/api/trace/__init__.py +44 -0
- agentinsight/api/trace/client.py +744 -0
- agentinsight/api/trace/raw_client.py +1228 -0
- agentinsight/api/trace/types/__init__.py +46 -0
- agentinsight/api/trace/types/delete_trace_response.py +14 -0
- agentinsight/api/trace/types/sort.py +14 -0
- agentinsight/api/trace/types/traces.py +17 -0
- agentinsight/api/utils/__init__.py +44 -0
- agentinsight/api/utils/pagination/__init__.py +40 -0
- agentinsight/api/utils/pagination/types/__init__.py +40 -0
- agentinsight/api/utils/pagination/types/meta_response.py +38 -0
- agentinsight/batch_evaluation.py +1643 -0
- agentinsight/experiment.py +1207 -0
- agentinsight/langchain/CallbackHandler.py +1791 -0
- agentinsight/langchain/__init__.py +5 -0
- agentinsight/langchain/utils.py +212 -0
- agentinsight/logger.py +28 -0
- agentinsight/media.py +352 -0
- agentinsight/model.py +479 -0
- agentinsight/openai.py +1390 -0
- agentinsight/py.typed +0 -0
- agentinsight/span_filter.py +19 -0
- agentinsight/types.py +83 -0
- agentinsight_sdk-0.1.0.dist-info/METADATA +820 -0
- agentinsight_sdk-0.1.0.dist-info/RECORD +394 -0
- agentinsight_sdk-0.1.0.dist-info/WHEEL +4 -0
- agentinsight_sdk-0.1.0.dist-info/licenses/LICENSE +22 -0
agentinsight/__init__.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
""".. include:: ../README.md"""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Optional
|
|
4
|
+
|
|
5
|
+
from agentinsight.batch_evaluation import (
|
|
6
|
+
BatchEvaluationResult,
|
|
7
|
+
BatchEvaluationResumeToken,
|
|
8
|
+
CompositeEvaluatorFunction,
|
|
9
|
+
EvaluatorInputs,
|
|
10
|
+
EvaluatorStats,
|
|
11
|
+
MapperFunction,
|
|
12
|
+
)
|
|
13
|
+
from agentinsight.experiment import Evaluation, RegressionError, RunnerContext
|
|
14
|
+
|
|
15
|
+
from ._client import client as _client_module
|
|
16
|
+
from ._client.attributes import AgentInsightOtelSpanAttributes
|
|
17
|
+
from ._client.client import Serializable
|
|
18
|
+
from ._client.config import AgentInsightConfig
|
|
19
|
+
from ._client.constants import ObservationTypeLiteral
|
|
20
|
+
from ._client.exceptions import (
|
|
21
|
+
AgentInsightAuthenticationError,
|
|
22
|
+
AgentInsightConfigurationError,
|
|
23
|
+
AgentInsightConnectionError,
|
|
24
|
+
AgentInsightError,
|
|
25
|
+
AgentInsightSerializationError,
|
|
26
|
+
AgentInsightTimeoutError,
|
|
27
|
+
)
|
|
28
|
+
from ._client.get_client import get_client
|
|
29
|
+
from ._client.observe import observe
|
|
30
|
+
from ._client.propagation import propagate_attributes
|
|
31
|
+
from ._client.span import (
|
|
32
|
+
AgentInsightAgent,
|
|
33
|
+
AgentInsightChain,
|
|
34
|
+
AgentInsightEmbedding,
|
|
35
|
+
AgentInsightEvaluator,
|
|
36
|
+
AgentInsightEvent,
|
|
37
|
+
AgentInsightGeneration,
|
|
38
|
+
AgentInsightGuardrail,
|
|
39
|
+
AgentInsightRetriever,
|
|
40
|
+
AgentInsightSpan,
|
|
41
|
+
AgentInsightTool,
|
|
42
|
+
)
|
|
43
|
+
from ._version import __version__
|
|
44
|
+
from .span_filter import (
|
|
45
|
+
KNOWN_LLM_INSTRUMENTATION_SCOPE_PREFIXES,
|
|
46
|
+
is_agentinsight_span,
|
|
47
|
+
is_default_export_span,
|
|
48
|
+
is_genai_span,
|
|
49
|
+
is_known_llm_instrumentor,
|
|
50
|
+
is_langfuse_span,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
AgentInsight = _client_module.AgentInsight
|
|
54
|
+
AgentInsightClient = _client_module.AgentInsightClient
|
|
55
|
+
|
|
56
|
+
_default_client: Optional[AgentInsight] = None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def init(
|
|
60
|
+
*,
|
|
61
|
+
public_key: Optional[str] = None,
|
|
62
|
+
secret_key: Optional[str] = None,
|
|
63
|
+
base_url: Optional[str] = None,
|
|
64
|
+
**kwargs: Any,
|
|
65
|
+
) -> AgentInsight:
|
|
66
|
+
global _default_client
|
|
67
|
+
_default_client = AgentInsight(
|
|
68
|
+
public_key=public_key, secret_key=secret_key, base_url=base_url, **kwargs
|
|
69
|
+
)
|
|
70
|
+
return _default_client
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
__all__ = [
|
|
74
|
+
"AgentInsight",
|
|
75
|
+
"AgentInsightClient",
|
|
76
|
+
"AgentInsightConfig",
|
|
77
|
+
"init",
|
|
78
|
+
"get_client",
|
|
79
|
+
"observe",
|
|
80
|
+
"propagate_attributes",
|
|
81
|
+
"ObservationTypeLiteral",
|
|
82
|
+
"AgentInsightSpan",
|
|
83
|
+
"AgentInsightGeneration",
|
|
84
|
+
"AgentInsightEvent",
|
|
85
|
+
"AgentInsightOtelSpanAttributes",
|
|
86
|
+
"Serializable",
|
|
87
|
+
"AgentInsightAgent",
|
|
88
|
+
"AgentInsightTool",
|
|
89
|
+
"AgentInsightChain",
|
|
90
|
+
"AgentInsightEmbedding",
|
|
91
|
+
"AgentInsightEvaluator",
|
|
92
|
+
"AgentInsightRetriever",
|
|
93
|
+
"AgentInsightGuardrail",
|
|
94
|
+
"AgentInsightError",
|
|
95
|
+
"AgentInsightAuthenticationError",
|
|
96
|
+
"AgentInsightConnectionError",
|
|
97
|
+
"AgentInsightSerializationError",
|
|
98
|
+
"AgentInsightConfigurationError",
|
|
99
|
+
"AgentInsightTimeoutError",
|
|
100
|
+
"Evaluation",
|
|
101
|
+
"EvaluatorInputs",
|
|
102
|
+
"MapperFunction",
|
|
103
|
+
"CompositeEvaluatorFunction",
|
|
104
|
+
"EvaluatorStats",
|
|
105
|
+
"BatchEvaluationResumeToken",
|
|
106
|
+
"BatchEvaluationResult",
|
|
107
|
+
"RunnerContext",
|
|
108
|
+
"RegressionError",
|
|
109
|
+
"__version__",
|
|
110
|
+
"is_default_export_span",
|
|
111
|
+
"is_langfuse_span",
|
|
112
|
+
"is_agentinsight_span",
|
|
113
|
+
"is_genai_span",
|
|
114
|
+
"is_known_llm_instrumentor",
|
|
115
|
+
"KNOWN_LLM_INSTRUMENTATION_SCOPE_PREFIXES",
|
|
116
|
+
"experiment",
|
|
117
|
+
"api",
|
|
118
|
+
]
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"""Span attribute management for AgentInsight OpenTelemetry integration.
|
|
2
|
+
|
|
3
|
+
This module defines constants and functions for managing OpenTelemetry span attributes
|
|
4
|
+
used by AgentInsight. It provides a structured approach to creating and manipulating
|
|
5
|
+
attributes for different span types (trace, span, generation) while ensuring consistency.
|
|
6
|
+
|
|
7
|
+
The module includes:
|
|
8
|
+
- Attribute name constants organized by category
|
|
9
|
+
- Functions to create attribute dictionaries for different entity types
|
|
10
|
+
- Utilities for serializing and processing attribute values
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from typing import Any, Dict, Literal, Optional, Union
|
|
16
|
+
|
|
17
|
+
from agentinsight._client.constants import (
|
|
18
|
+
ObservationTypeGenerationLike,
|
|
19
|
+
ObservationTypeSpanLike,
|
|
20
|
+
)
|
|
21
|
+
from agentinsight._utils.serializer import EventSerializer
|
|
22
|
+
from agentinsight.api import MapValue
|
|
23
|
+
from agentinsight.model import PromptClient
|
|
24
|
+
from agentinsight.types import SpanLevel
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AgentInsightOtelSpanAttributes:
|
|
28
|
+
TRACE_NAME = "langfuse.trace.name"
|
|
29
|
+
TRACE_NAME_NEW = "agentinsight.trace.name"
|
|
30
|
+
TRACE_USER_ID = "user.id"
|
|
31
|
+
TRACE_USER_ID_NEW = "agentinsight.user.id"
|
|
32
|
+
TRACE_SESSION_ID = "session.id"
|
|
33
|
+
TRACE_SESSION_ID_NEW = "agentinsight.session.id"
|
|
34
|
+
TRACE_TAGS = "langfuse.trace.tags"
|
|
35
|
+
TRACE_TAGS_NEW = "agentinsight.trace.tags"
|
|
36
|
+
TRACE_PUBLIC = "langfuse.trace.public"
|
|
37
|
+
TRACE_PUBLIC_NEW = "agentinsight.trace.public"
|
|
38
|
+
TRACE_METADATA = "langfuse.trace.metadata"
|
|
39
|
+
TRACE_METADATA_NEW = "agentinsight.trace.metadata"
|
|
40
|
+
TRACE_INPUT = "langfuse.trace.input"
|
|
41
|
+
TRACE_INPUT_NEW = "agentinsight.trace.input"
|
|
42
|
+
TRACE_OUTPUT = "langfuse.trace.output"
|
|
43
|
+
TRACE_OUTPUT_NEW = "agentinsight.trace.output"
|
|
44
|
+
|
|
45
|
+
OBSERVATION_TYPE = "langfuse.observation.type"
|
|
46
|
+
OBSERVATION_TYPE_NEW = "agentinsight.observation.type"
|
|
47
|
+
OBSERVATION_METADATA = "langfuse.observation.metadata"
|
|
48
|
+
OBSERVATION_METADATA_NEW = "agentinsight.observation.metadata"
|
|
49
|
+
OBSERVATION_LEVEL = "langfuse.observation.level"
|
|
50
|
+
OBSERVATION_LEVEL_NEW = "agentinsight.observation.level"
|
|
51
|
+
OBSERVATION_STATUS_MESSAGE = "langfuse.observation.status_message"
|
|
52
|
+
OBSERVATION_STATUS_MESSAGE_NEW = "agentinsight.observation.status_message"
|
|
53
|
+
OBSERVATION_INPUT = "langfuse.observation.input"
|
|
54
|
+
OBSERVATION_INPUT_NEW = "agentinsight.observation.input"
|
|
55
|
+
OBSERVATION_OUTPUT = "langfuse.observation.output"
|
|
56
|
+
OBSERVATION_OUTPUT_NEW = "agentinsight.observation.output"
|
|
57
|
+
|
|
58
|
+
OBSERVATION_COMPLETION_START_TIME = "langfuse.observation.completion_start_time"
|
|
59
|
+
OBSERVATION_COMPLETION_START_TIME_NEW = (
|
|
60
|
+
"agentinsight.observation.completion_start_time"
|
|
61
|
+
)
|
|
62
|
+
OBSERVATION_MODEL = "langfuse.observation.model.name"
|
|
63
|
+
OBSERVATION_MODEL_NEW = "agentinsight.observation.model.name"
|
|
64
|
+
OBSERVATION_MODEL_PARAMETERS = "langfuse.observation.model.parameters"
|
|
65
|
+
OBSERVATION_MODEL_PARAMETERS_NEW = "agentinsight.observation.model.parameters"
|
|
66
|
+
OBSERVATION_USAGE_DETAILS = "langfuse.observation.usage_details"
|
|
67
|
+
OBSERVATION_USAGE_DETAILS_NEW = "agentinsight.observation.usage_details"
|
|
68
|
+
OBSERVATION_COST_DETAILS = "langfuse.observation.cost_details"
|
|
69
|
+
OBSERVATION_COST_DETAILS_NEW = "agentinsight.observation.cost_details"
|
|
70
|
+
OBSERVATION_PROMPT_NAME = "langfuse.observation.prompt.name"
|
|
71
|
+
OBSERVATION_PROMPT_NAME_NEW = "agentinsight.observation.prompt.name"
|
|
72
|
+
OBSERVATION_PROMPT_VERSION = "langfuse.observation.prompt.version"
|
|
73
|
+
OBSERVATION_PROMPT_VERSION_NEW = "agentinsight.observation.prompt.version"
|
|
74
|
+
|
|
75
|
+
ENVIRONMENT = "langfuse.environment"
|
|
76
|
+
ENVIRONMENT_NEW = "agentinsight.environment"
|
|
77
|
+
RELEASE = "langfuse.release"
|
|
78
|
+
RELEASE_NEW = "agentinsight.release"
|
|
79
|
+
VERSION = "langfuse.version"
|
|
80
|
+
VERSION_NEW = "agentinsight.version"
|
|
81
|
+
|
|
82
|
+
AS_ROOT = "langfuse.internal.as_root"
|
|
83
|
+
AS_ROOT_NEW = "agentinsight.internal.as_root"
|
|
84
|
+
|
|
85
|
+
EXPERIMENT_ID = "langfuse.experiment.id"
|
|
86
|
+
EXPERIMENT_ID_NEW = "agentinsight.experiment.id"
|
|
87
|
+
EXPERIMENT_NAME = "langfuse.experiment.name"
|
|
88
|
+
EXPERIMENT_NAME_NEW = "agentinsight.experiment.name"
|
|
89
|
+
EXPERIMENT_DESCRIPTION = "langfuse.experiment.description"
|
|
90
|
+
EXPERIMENT_DESCRIPTION_NEW = "agentinsight.experiment.description"
|
|
91
|
+
EXPERIMENT_METADATA = "langfuse.experiment.metadata"
|
|
92
|
+
EXPERIMENT_METADATA_NEW = "agentinsight.experiment.metadata"
|
|
93
|
+
EXPERIMENT_DATASET_ID = "langfuse.experiment.dataset.id"
|
|
94
|
+
EXPERIMENT_DATASET_ID_NEW = "agentinsight.experiment.dataset.id"
|
|
95
|
+
EXPERIMENT_ITEM_ID = "langfuse.experiment.item.id"
|
|
96
|
+
EXPERIMENT_ITEM_ID_NEW = "agentinsight.experiment.item.id"
|
|
97
|
+
EXPERIMENT_ITEM_EXPECTED_OUTPUT = "langfuse.experiment.item.expected_output"
|
|
98
|
+
EXPERIMENT_ITEM_EXPECTED_OUTPUT_NEW = "agentinsight.experiment.item.expected_output"
|
|
99
|
+
EXPERIMENT_ITEM_METADATA = "langfuse.experiment.item.metadata"
|
|
100
|
+
EXPERIMENT_ITEM_METADATA_NEW = "agentinsight.experiment.item.metadata"
|
|
101
|
+
EXPERIMENT_ITEM_ROOT_OBSERVATION_ID = "langfuse.experiment.item.root_observation_id"
|
|
102
|
+
EXPERIMENT_ITEM_ROOT_OBSERVATION_ID_NEW = (
|
|
103
|
+
"agentinsight.experiment.item.root_observation_id"
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def create_trace_attributes(
|
|
108
|
+
*,
|
|
109
|
+
input: Optional[Any] = None,
|
|
110
|
+
output: Optional[Any] = None,
|
|
111
|
+
public: Optional[bool] = None,
|
|
112
|
+
) -> dict:
|
|
113
|
+
attributes = {
|
|
114
|
+
AgentInsightOtelSpanAttributes.TRACE_INPUT: _serialize(input),
|
|
115
|
+
AgentInsightOtelSpanAttributes.TRACE_OUTPUT: _serialize(output),
|
|
116
|
+
AgentInsightOtelSpanAttributes.TRACE_PUBLIC: public,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {k: v for k, v in attributes.items() if v is not None}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def create_span_attributes(
|
|
123
|
+
*,
|
|
124
|
+
metadata: Optional[Any] = None,
|
|
125
|
+
input: Optional[Any] = None,
|
|
126
|
+
output: Optional[Any] = None,
|
|
127
|
+
level: Optional[SpanLevel] = None,
|
|
128
|
+
status_message: Optional[str] = None,
|
|
129
|
+
version: Optional[str] = None,
|
|
130
|
+
observation_type: Optional[
|
|
131
|
+
Union[ObservationTypeSpanLike, Literal["event"]]
|
|
132
|
+
] = "span",
|
|
133
|
+
) -> dict:
|
|
134
|
+
attributes = {
|
|
135
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_TYPE: observation_type,
|
|
136
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_LEVEL: level,
|
|
137
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_STATUS_MESSAGE: status_message,
|
|
138
|
+
AgentInsightOtelSpanAttributes.VERSION: version,
|
|
139
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_INPUT: _serialize(input),
|
|
140
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_OUTPUT: _serialize(output),
|
|
141
|
+
**_flatten_and_serialize_metadata(metadata, "observation"),
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {k: v for k, v in attributes.items() if v is not None}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def create_generation_attributes(
|
|
148
|
+
*,
|
|
149
|
+
name: Optional[str] = None,
|
|
150
|
+
completion_start_time: Optional[datetime] = None,
|
|
151
|
+
metadata: Optional[Any] = None,
|
|
152
|
+
level: Optional[SpanLevel] = None,
|
|
153
|
+
status_message: Optional[str] = None,
|
|
154
|
+
version: Optional[str] = None,
|
|
155
|
+
model: Optional[str] = None,
|
|
156
|
+
model_parameters: Optional[Dict[str, MapValue]] = None,
|
|
157
|
+
input: Optional[Any] = None,
|
|
158
|
+
output: Optional[Any] = None,
|
|
159
|
+
usage_details: Optional[Dict[str, int]] = None,
|
|
160
|
+
cost_details: Optional[Dict[str, float]] = None,
|
|
161
|
+
prompt: Optional[PromptClient] = None,
|
|
162
|
+
observation_type: Optional[ObservationTypeGenerationLike] = "generation",
|
|
163
|
+
) -> dict:
|
|
164
|
+
attributes = {
|
|
165
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_TYPE: observation_type,
|
|
166
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_LEVEL: level,
|
|
167
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_STATUS_MESSAGE: status_message,
|
|
168
|
+
AgentInsightOtelSpanAttributes.VERSION: version,
|
|
169
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_INPUT: _serialize(input),
|
|
170
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_OUTPUT: _serialize(output),
|
|
171
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_MODEL: model,
|
|
172
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_PROMPT_NAME: prompt.name
|
|
173
|
+
if prompt and not prompt.is_fallback
|
|
174
|
+
else None,
|
|
175
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_PROMPT_VERSION: prompt.version
|
|
176
|
+
if prompt and not prompt.is_fallback
|
|
177
|
+
else None,
|
|
178
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_USAGE_DETAILS: _serialize(
|
|
179
|
+
usage_details
|
|
180
|
+
),
|
|
181
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_COST_DETAILS: _serialize(
|
|
182
|
+
cost_details
|
|
183
|
+
),
|
|
184
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_COMPLETION_START_TIME: _serialize(
|
|
185
|
+
completion_start_time
|
|
186
|
+
),
|
|
187
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_MODEL_PARAMETERS: _serialize(
|
|
188
|
+
model_parameters
|
|
189
|
+
),
|
|
190
|
+
**_flatten_and_serialize_metadata(metadata, "observation"),
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return {k: v for k, v in attributes.items() if v is not None}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def _serialize(obj: Any) -> Optional[str]:
|
|
197
|
+
if obj is None or isinstance(obj, str):
|
|
198
|
+
return obj
|
|
199
|
+
|
|
200
|
+
return json.dumps(obj, cls=EventSerializer)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def _flatten_and_serialize_metadata_values(
|
|
204
|
+
metadata: Optional[Dict[str, Any]],
|
|
205
|
+
) -> Optional[Dict[str, str]]:
|
|
206
|
+
if metadata is None:
|
|
207
|
+
return None
|
|
208
|
+
|
|
209
|
+
flattened_metadata: Dict[str, str] = {}
|
|
210
|
+
|
|
211
|
+
def flatten_value(path: str, value: Any) -> None:
|
|
212
|
+
if isinstance(value, dict):
|
|
213
|
+
for nested_key, nested_value in value.items():
|
|
214
|
+
flatten_value(f"{path}.{nested_key}", nested_value)
|
|
215
|
+
|
|
216
|
+
return
|
|
217
|
+
|
|
218
|
+
serialized_value = _serialize(value)
|
|
219
|
+
|
|
220
|
+
if serialized_value is not None:
|
|
221
|
+
flattened_metadata[path] = serialized_value
|
|
222
|
+
|
|
223
|
+
for key, value in metadata.items():
|
|
224
|
+
flatten_value(str(key), value)
|
|
225
|
+
|
|
226
|
+
return flattened_metadata
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def _flatten_and_serialize_metadata(
|
|
230
|
+
metadata: Any, type: Literal["observation", "trace"]
|
|
231
|
+
) -> dict:
|
|
232
|
+
prefix = (
|
|
233
|
+
AgentInsightOtelSpanAttributes.OBSERVATION_METADATA
|
|
234
|
+
if type == "observation"
|
|
235
|
+
else AgentInsightOtelSpanAttributes.TRACE_METADATA
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
metadata_attributes: Dict[str, Union[str, int, None]] = {}
|
|
239
|
+
|
|
240
|
+
if not isinstance(metadata, dict):
|
|
241
|
+
metadata_attributes[prefix] = _serialize(metadata)
|
|
242
|
+
else:
|
|
243
|
+
for key, value in metadata.items():
|
|
244
|
+
metadata_attributes[f"{prefix}.{key}"] = (
|
|
245
|
+
value
|
|
246
|
+
if isinstance(value, str) or isinstance(value, int)
|
|
247
|
+
else _serialize(value)
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
return metadata_attributes
|