Skip to content

Commit

Permalink
feat: schema update for /v2/evaluators (#167)
Browse files Browse the repository at this point in the history
* feat: schema update for /v2/evaluators

* fix: change /v2/evaluators method, make parameters nullable

* feat: more properties in EvaluatorV2
  • Loading branch information
xke committed Apr 15, 2024
1 parent ddb6d56 commit 9ffa5ba
Showing 1 changed file with 147 additions and 0 deletions.
147 changes: 147 additions & 0 deletions spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,53 @@ paths:
"404":
description: Folder not found

/v2/evaluators:
get:
tags:
- v2
summary: Get evaluators
description: Get evaluators for a given pipeline
parameters:
- in: query
name: pipelineId
schema:
type: string
nullable: true
format: uuid
description: The ID of the Pipeline to retrieve evaluators for. Use "null" to retrieve the organization's evaluator templates.
- in: query
name: pipelineSlug
schema:
type: string
nullable: true
description: Or, the slug of the Pipeline to retrieve evaluators for
responses:
"200":
description: Evaluators retrieved successfully
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: "#/components/schemas/EvaluatorV2"
required:
- data
application/json; charset=utf-8:
schema:
type: object
properties:
data:
type: array
items:
$ref: "#/components/schemas/EvaluatorV2"
required:
- data
"404":
description: Pipeline not found

/v2/evaluations/bulk:
post:
tags:
Expand Down Expand Up @@ -2113,3 +2160,103 @@ components:
- name
- organizationId
- parentFolderId

EvaluatorV2:
type: object
properties:
id:
type: string
format: uuid
description: The ID of the evaluator
createdAt:
$ref: '#/components/schemas/UnixSeconds'
updatedAt:
$ref: '#/components/schemas/UnixSeconds'
archivedAt:
$ref: '#/components/schemas/UnixSeconds'
nullable: true
icon:
type: string
nullable: true
name:
type: string
description: The name of the evaluator
options:
type: object
description: For evaluators with options scoring, the available options to choose from
nullable: true
aiModel:
type: string
description: For AI evaluators, the AI model to use
pipelineId:
type: string
format: uuid
description: The ID of the pipeline that the evaluator belongs to
nullable: true
processorId:
type: string
format: uuid
description: The ID of the processor associated with the evaluator
nullable: true
organizationId:
type: string
format: uuid
description: The ID of the organization that the evaluator belongs to
templateDescription:
type: string
description: For evaluator templates, the description of the template
heuristicFn:
type: string
description: For heuristic evaluators, the heuristic function to use
nullable: true
aiPromptFormat:
type: string
description: For AI evaluators, the prompt template that should be sent to the AI model
nullable: true
aiImageUrls:
type: array
items:
type: string
description: For AI image evaluators, the paths to the image URLs
humanPrompt:
type: string
description: For human evaluators, the instructions for the human to follow
nullable: true
classifierValuePath:
type: string
description: For classification evaluators, the path to the predicted classification
nullable: true
classifierExpectedValuePath:
type: string
description: For classification evaluators, the path to the expected classification
nullable: true
multiClassOptions:
type: array
items:
type: string
description: For classification evaluators using multi-class evaluation, the available options to match with
who:
type: string
description: The type of evaluator (such as "AI", "HEURISTIC", "HUMAN", "CLASSIFIER")
valueType:
type: string
description: The scoring method used by the evaluator (such as "ENUM", "PERCENTAGE")
runCondition:
type: string
description: The run condition of the evaluator (such as "TEST_PROD", "TEST", "PROD", "COMPARISON_2")
prodEvalActive:
deprecated: true
type: boolean
description: Use "samplingProbability" instead
samplingProbability:
type: number
description: When optionally running on production data, the associated sampling probability of this evaluator (from 0 to 100)
nullable: true
required:
- id
- name
- createdAt
- updatedAt
- who
- valueType
- runCondition

0 comments on commit 9ffa5ba

Please sign in to comment.