Skip to content

Commit 8497a29

Browse files
authored
Merge branch 'master' into fb-dia-1384
2 parents 6520aba + 839f3c4 commit 8497a29

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

fern/openapi/overrides.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ paths:
8888
- public
8989

9090
/api/prompts/{prompt_id}/versions/{version_id}/refine:
91+
get:
92+
$ref: "./resources/prompts.yaml#/paths/~1api~1prompts~1{prompt_id}~1versions~1{version_id}~1refine/get"
93+
x-fern-sdk-group-name:
94+
- prompts
95+
- versions
96+
x-fern-sdk-method-name: get_refined_prompt
97+
x-fern-audiences:
98+
- public
9199
post:
92100
$ref: "./resources/prompts.yaml#/paths/~1api~1prompts~1{prompt_id}~1versions~1{version_id}~1refine/post"
93101
x-fern-sdk-group-name:

fern/openapi/resources/prompts.yaml

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,37 @@ paths:
319319
$ref: "#/components/schemas/InferenceRun"
320320

321321
/api/prompts/{prompt_id}/versions/{version_id}/refine:
322+
get:
323+
summary: Get refined prompt
324+
description: >
325+
Get the refined prompt based on the `refinement_job_id`.
326+
parameters:
327+
- name: prompt_id
328+
in: path
329+
description: Prompt ID
330+
required: true
331+
schema:
332+
type: integer
333+
- name: version_id
334+
in: path
335+
description: Prompt Version ID
336+
required: true
337+
schema:
338+
type: integer
339+
- name: refinement_job_id
340+
in: query
341+
description: Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint
342+
required: true
343+
schema:
344+
type: string
345+
responses:
346+
"200":
347+
description: ""
348+
content:
349+
application/json:
350+
schema:
351+
$ref: "#/components/schemas/RefinedPromptResponse"
352+
322353
post:
323354
summary: Refine a prompt version
324355
description: >
@@ -336,6 +367,12 @@ paths:
336367
required: true
337368
schema:
338369
type: integer
370+
- name: async
371+
in: query
372+
description: Run the refinement job asynchronously
373+
required: false
374+
schema:
375+
type: boolean
339376
requestBody:
340377
$ref: "#/components/requestBodies/api_prompts_versions_refine_prompt_create"
341378
responses:
@@ -344,7 +381,8 @@ paths:
344381
content:
345382
application/json:
346383
schema:
347-
$ref: "#/components/schemas/PromptVersion"
384+
$ref: "#/components/schemas/RefinedPromptResponse"
385+
348386
/api/inference-runs/{pk}/indicators:
349387
get:
350388
summary: Get key indicators
@@ -709,6 +747,40 @@ components:
709747
description: Total cost of the inference (in USD)
710748
nullable: true
711749

750+
RefinedPromptResponse:
751+
type: object
752+
properties:
753+
title:
754+
type: string
755+
title: Title
756+
description: Title of the refined prompt
757+
reasoning:
758+
type: string
759+
title: Reasoning
760+
description: Reasoning behind the refinement
761+
prompt:
762+
type: string
763+
title: Prompt
764+
description: The refined prompt text
765+
refinement_job_id:
766+
type: string
767+
title: Refinement Job ID
768+
description: Unique identifier for the refinement job
769+
readOnly: true
770+
refinement_status:
771+
type: string
772+
title: Refinement Status
773+
description: Status of the refinement job
774+
enum:
775+
- Pending
776+
- InProgress
777+
- Completed
778+
- Failed
779+
readOnly: true
780+
default: Pending
781+
required:
782+
- prompt
783+
712784
requestBodies:
713785
api_prompts_batch_predictions_create:
714786
content:

0 commit comments

Comments
 (0)