Skip to content

Commit 4ab7349

Browse files
author
nik
committed
Add /indicators API
1 parent af166bd commit 4ab7349

File tree

3 files changed

+79
-3
lines changed

3 files changed

+79
-3
lines changed

fern/openapi/overrides.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ paths:
4141
x-fern-audiences:
4242
- public
4343

44+
/api/prompts/indicators:
45+
get:
46+
$ref: "./resources/prompts.yaml#/paths/~1api~1prompts~1indicators/get"
47+
x-fern-sdk-group-name:
48+
- prompts
49+
- indicators
50+
x-fern-sdk-method-name: list
51+
x-fern-audiences:
52+
- public
53+
54+
/api/prompts/indicators/{key}:
55+
get:
56+
$ref: "./resources/prompts.yaml#/paths/~1api~1prompts~1indicators~1{key}/get"
57+
x-fern-sdk-group-name:
58+
- prompts
59+
- indicators
60+
x-fern-sdk-method-name: get
61+
x-fern-audiences:
62+
- public
63+
4464
/api/model-provider-connections/:
4565
post:
4666
$ref: "./resources/prompts.yaml#/paths/~1api~1model-provider-connections/post"

fern/openapi/resources/dashboards.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,15 @@ components:
4646
type: string
4747
extra_kpis:
4848
title: Secondary KPIs, displayed to the right of the main_kpi
49-
type: array
49+
type: array
50+
51+
KeyIndicatorValue:
52+
title: Key Indicator Value
53+
type: object
54+
properties:
55+
title:
56+
title: Key Indicator Title
57+
type: string
58+
values:
59+
title: Key Indicator Values
60+
type: object

fern/openapi/resources/prompts.yaml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,52 @@ paths:
126126
schema:
127127
$ref: "#/components/schemas/InferenceRun"
128128

129+
/api/prompts/indicators:
130+
get:
131+
summary: Get key indicators
132+
description: >
133+
Get key indicators for the Prompt dashboard.
134+
parameters:
135+
- name: run_id
136+
in: query
137+
description: Inference run ID
138+
required: true
139+
schema:
140+
type: integer
141+
responses:
142+
"200":
143+
description: ""
144+
content:
145+
application/json:
146+
schema:
147+
$ref: "./dashboards.yaml#/components/schemas/KeyIndicators"
148+
149+
/api/prompts/indicators/{key}:
150+
get:
151+
summary: Get key indicator
152+
description: >
153+
Get a specific key indicator for the Prompt dashboard.
154+
parameters:
155+
- name: key
156+
in: path
157+
description: Key of the indicator
158+
required: true
159+
schema:
160+
type: string
161+
- name: run_id
162+
in: query
163+
description: Inference run ID
164+
required: true
165+
schema:
166+
type: integer
167+
responses:
168+
"200":
169+
description: ""
170+
content:
171+
application/json:
172+
schema:
173+
$ref: "./dashboards.yaml#/components/schemas/KeyIndicatorValue"
174+
129175
/api/model-provider-connections:
130176
post:
131177
summary: Create model provider connection
@@ -346,8 +392,7 @@ components:
346392
format: date-time
347393
nullable: true
348394
readOnly: true
349-
indicators:
350-
$ref: "dashboards.yaml#/components/schemas/KeyIndicators"
395+
351396
ModelProviderConnection:
352397
required:
353398
- provider

0 commit comments

Comments
 (0)