Skip to content

Commit

Permalink
feat: DIA-1402: V1-Submit Prompt auto-refinement job (#27)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Belonogov <[email protected]>
  • Loading branch information
matt-bernstein and nikitabelonogov authored Oct 1, 2024
1 parent 5c8a8bc commit 6914716
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fern/openapi/overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ paths:
x-fern-audiences:
- public

/api/prompts/{prompt_id}/versions/{version_id}/refine:
post:
$ref: "./resources/prompts.yaml#/paths/~1api~1prompts~1{prompt_id}~1versions~1{version_id}~1refine/post"
x-fern-sdk-group-name:
- prompts
- versions
x-fern-sdk-method-name: refine_prompt
x-fern-audiences:
- public

/api/prompts/{id}/versions/{version_id}/inference-runs:
get:
$ref: "./resources/prompts.yaml#/paths/~1api~1prompts~1{id}~1versions~1{version_id}~1inference-runs/get"
Expand Down
47 changes: 47 additions & 0 deletions fern/openapi/resources/prompts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,33 @@ paths:
schema:
$ref: "#/components/schemas/InferenceRun"

/api/prompts/{prompt_id}/versions/{version_id}/refine:
post:
summary: Refine a prompt version
description: >
Refine a prompt version using a teacher model and save the refined prompt as a new version.
parameters:
- name: prompt_id
in: path
description: Prompt ID
required: true
schema:
type: integer
- name: version_id
in: path
description: Base Prompt Version ID
required: true
schema:
type: integer
requestBody:
$ref: "#/components/requestBodies/api_prompts_versions_refine_prompt_create"
responses:
"201":
description: ""
content:
application/json:
schema:
$ref: "#/components/schemas/PromptVersion"
/api/inference-runs/{pk}/indicators:
get:
summary: Get key indicators
Expand Down Expand Up @@ -726,3 +753,23 @@ components:
description: Error message details
additionalProperties:
nullable: true
api_prompts_versions_refine_prompt_create:
content:
application/json:
schema:
type: object
properties: # TODO need to add model version from url here?
teacher_model_provider_connection_id:
title: Teacher Model Provider Connection ID
description: Model Provider Connection ID to use to refine the prompt
type: integer
teacher_model_name:
title: Teacher Model Name
description: Name of the model to use to refine the prompt
type: string
additionalProperties:
nullable: true
project_id:
title: Project ID
description: Project ID to target the refined prompt for
type: integer

0 comments on commit 6914716

Please sign in to comment.