diff --git a/specification/resources/gen-ai/definitions.yml b/specification/resources/gen-ai/definitions.yml index 52ee2d115..814a2c7d9 100644 --- a/specification/resources/gen-ai/definitions.yml +++ b/specification/resources/gen-ai/definitions.yml @@ -1,3 +1,26 @@ +apiAWSDataSource: + description: AWS S3 Data Source + properties: + bucket_name: + description: Spaces bucket name + example: '"example name"' + type: string + item_path: + example: '"example string"' + type: string + key_id: + description: The AWS Key ID + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + region: + description: Region of bucket + example: '"example string"' + type: string + secret_key: + description: The AWS Secret Key + example: '"example string"' + type: string + type: object apiAcceptAgreementOutput: description: AcceptAgreementOutput Description properties: @@ -1091,6 +1114,13 @@ apiCreateEvaluationDatasetOutput: example: '"123e4567-e89b-12d3-a456-426614174000"' type: string type: object +apiCreateEvaluationTestCaseOutput: + properties: + test_case_uuid: + description: Test‑case UUID. + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + type: object apiCreateGuardrailOutput: description: CreateGuardrailOutput description properties: @@ -1100,6 +1130,8 @@ apiCreateGuardrailOutput: apiCreateKnowledgeBaseDataSourceInputPublic: description: Data to create a knowledge base data source properties: + aws_data_source: + $ref: '#/apiAWSDataSource' knowledge_base_uuid: description: Knowledge base id example: '"12345678-1234-1234-1234-123456789012"' @@ -1388,6 +1420,110 @@ apiDeploymentVisibility: - VISIBILITY_PRIVATE example: VISIBILITY_UNKNOWN type: string +apiEvaluationMetric: + properties: + description: + example: '"example string"' + type: string + metric_name: + example: '"example name"' + type: string + metric_type: + $ref: '#/apiEvaluationMetricType' + metric_uuid: + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + metric_value_type: + $ref: '#/apiEvaluationMetricValueType' + type: object +apiEvaluationMetricType: + default: METRIC_TYPE_UNSPECIFIED + enum: + - METRIC_TYPE_UNSPECIFIED + - METRIC_TYPE_GENERAL_QUALITY + - METRIC_TYPE_RAG_AND_TOOL + example: METRIC_TYPE_UNSPECIFIED + type: string +apiEvaluationMetricValueType: + default: METRIC_VALUE_TYPE_UNSPECIFIED + enum: + - METRIC_VALUE_TYPE_UNSPECIFIED + - METRIC_VALUE_TYPE_NUMBER + - METRIC_VALUE_TYPE_STRING + example: METRIC_VALUE_TYPE_UNSPECIFIED + type: string +apiEvaluationTestCase: + properties: + archived_at: + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + created_at: + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + created_by_user_email: + example: example@example.com + type: string + created_by_user_id: + example: '"12345"' + format: uint64 + type: string + dataset_name: + example: '"example name"' + type: string + dataset_uuid: + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + description: + example: '"example string"' + type: string + latest_version_number_of_runs: + example: 123 + format: int32 + type: integer + metrics: + items: + $ref: '#/apiEvaluationMetric' + type: array + name: + example: '"example name"' + type: string + star_metric: + $ref: '#/apiStarMetric' + test_case_uuid: + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + total_runs: + example: 123 + format: int32 + type: integer + updated_at: + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + updated_by_user_email: + example: example@example.com + type: string + updated_by_user_id: + example: '"12345"' + format: uint64 + type: string + version: + example: 123 + format: int64 + type: integer + type: object +apiEvaluationTestCaseMetricList: + properties: + metric_uuids: + example: + - example string + items: + example: '"example string"' + type: string + type: array + type: object apiFilePresignedUrlResponse: description: Detailed info about each presigned URL returned to the client. properties: @@ -1503,6 +1639,11 @@ apiGetChildrenOutput: $ref: '#/apiAgent' type: array type: object +apiGetEvaluationTestCaseOutput: + properties: + evaluation_test_case: + $ref: '#/apiEvaluationTestCase' + type: object apiGetGuardrailOutput: properties: guardrail: @@ -2333,6 +2474,22 @@ apiListAnthropicAPIKeysOutput: meta: $ref: '#/apiMeta' type: object +apiListEvaluationMetricsOutput: + properties: + metrics: + items: + $ref: '#/apiEvaluationMetric' + type: array + type: object +apiListEvaluationTestCasesOutput: + properties: + evaluation_test_cases: + description: Alternative way of authentication for internal usage only - should + not be exposed to public api + items: + $ref: '#/apiEvaluationTestCase' + type: array + type: object apiListGuardrailAgentsOutput: properties: agents: @@ -3023,6 +3180,22 @@ apiSpacesDataSource: example: '"example string"' type: string type: object +apiStarMetric: + properties: + metric_uuid: + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + name: + example: '"example name"' + type: string + success_threshold_pct: + description: |- + The success threshold for the star metric. + This is a percentage value between 0 and 100. + example: 123 + format: int32 + type: integer + type: object apiStartKnowledgeBaseIndexingJobInputPublic: description: StartKnowledgeBaseIndexingJobInputPublic description properties: @@ -3321,6 +3494,17 @@ apiUpdateChatbotOutput: chatbot: $ref: '#/apiChatbot' type: object +apiUpdateEvaluationTestCaseOutput: + properties: + test_case_uuid: + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + version: + description: The new verson of the test case. + example: 123 + format: int32 + type: integer + type: object apiUpdateGuardrailOutput: description: UpdateGuardrailOutput description properties: