Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(api): add CorrectionScore type and update GetScoresResponseData to include correction scores (#11807)

marliessophieb9162bf507e6
diff --git a/fern/apis/server/definition/commons.yml b/fern/apis/server/definition/commons.yml
index f4aa0dd8b7..2080979cdd 100644
--- a/fern/apis/server/definition/commons.yml
+++ b/fern/apis/server/definition/commons.yml
@@ -379,6 +379,15 @@ types:
stringValue:
type: string
docs: The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category
+ CorrectionScore:
+ extends: BaseScore
+ properties:
+ value:
+ type: double
+ docs: The numeric value of the score. Always 0 for correction scores.
+ stringValue:
+ type: string
+ docs: The string representation of the correction content
Score:
discriminant: "dataType"
union:
@@ -391,6 +400,9 @@ types:
BOOLEAN:
type: BooleanScore
docs: "Score with BOOLEAN data type"
+ CORRECTION:
+ type: CorrectionScore
+ docs: "Score with CORRECTION data type"
CreateScoreValue:
discriminated: false
diff --git a/fern/apis/server/definition/score-v2.yml b/fern/apis/server/definition/score-v2.yml
index a7ffd63345..e376595917 100644
--- a/fern/apis/server/definition/score-v2.yml
+++ b/fern/apis/server/definition/score-v2.yml
@@ -111,12 +111,18 @@ types:
properties:
trace: optional<GetScoresResponseTraceData>
+ GetScoresResponseDataCorrection:
+ extends: commons.CorrectionScore
+ properties:
+ trace: optional<GetScoresResponseTraceData>
+
GetScoresResponseData:
discriminant: dataType
union:
NUMERIC: GetScoresResponseDataNumeric
CATEGORICAL: GetScoresResponseDataCategorical
BOOLEAN: GetScoresResponseDataBoolean
+ CORRECTION: GetScoresResponseDataCorrection
GetScoresResponse:
properties:
diff --git a/web/public/generated/api/openapi.yml b/web/public/generated/api/openapi.yml
index 5bbe00ba8a..d5b73ffabb 100644
--- a/web/public/generated/api/openapi.yml
+++ b/web/public/generated/api/openapi.yml
@@ -7109,6 +7109,22 @@ components:
- stringValue
allOf:
- $ref: '#/components/schemas/BaseScore'
+ CorrectionScore:
+ title: CorrectionScore
+ type: object
+ properties:
+ value:
+ type: number
+ format: double
+ description: The numeric value of the score. Always 0 for correction scores.
+ stringValue:
+ type: string
+ description: The string representation of the correction content
+ required:
+ - value
+ - stringValue
+ allOf:
+ - $ref: '#/components/schemas/BaseScore'
Score:
title: Score
oneOf:
@@ -7145,6 +7161,17 @@ components:
- $ref: '#/components/schemas/BooleanScore'
required:
- dataType
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ dataType:
+ type: string
+ enum:
+ - CORRECTION
+ - $ref: '#/components/schemas/CorrectionScore'
+ required:
+ - dataType
CreateScoreValue:
title: CreateScoreValue
oneOf:
@@ -10357,6 +10384,15 @@ components:
nullable: true
allOf:
- $ref: '#/components/schemas/BooleanScore'
+ GetScoresResponseDataCorrection:
+ title: GetScoresResponseDataCorrection
+ type: object
+ properties:
+ trace:
+ $ref: '#/components/schemas/GetScoresResponseTraceData'
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/CorrectionScore'
GetScoresResponseData:
title: GetScoresResponseData
oneOf:
@@ -10393,6 +10429,17 @@ components:
- $ref: '#/components/schemas/GetScoresResponseDataBoolean'
required:
- dataType
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ dataType:
+ type: string
+ enum:
+ - CORRECTION
+ - $ref: '#/components/schemas/GetScoresResponseDataCorrection'
+ required:
+ - dataType
GetScoresResponse:
title: GetScoresResponse
type: object