Update reward_model_scoring.yaml

add reward model identifier to the reward model spec
This commit is contained in:
Hardik Shah 2024-06-25 18:18:43 -07:00 committed by GitHub
parent 26d780809c
commit 47390bc9a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,27 +100,29 @@ components:
description: User provided metadata carried forward in the response. description: User provided metadata carried forward in the response.
paths: paths:
/reward_model_scoring/: /reward_model_scoring/:
get: post:
summary: Score a pair of prompt and response using a reward model summary: Score a pair of prompt and response using a reward model
description: Take a pair of prompt and responses and score them using a reward model description: Take a pair of prompt and responses and score them using a reward model
parameters: requestBody:
- in: query required: true
name: messages content:
application/json:
schema: schema:
type: object
properties:
reward_model:
type: string
description: Unique identifier for the reward model
messages:
type: array type: array
items: items:
$ref: '#/components/schemas/Message' $ref: '#/components/schemas/Message'
required: true description: List[Message] same as what is used in /chat_completion api
- in: query response:
name: response
schema:
$ref: '#/components/schemas/Completion' $ref: '#/components/schemas/Completion'
required: true description: Completion same as what is used in /chat_completion api
- in: query scoring_function:
name: scoring_function
schema:
type: string type: string
required: true
responses: responses:
'200': '200':
description: Scoring completed successfully description: Scoring completed successfully
@ -150,7 +152,10 @@ paths:
schema: schema:
type: object type: object
properties: properties:
# TODO: Maybe take local path but api first uploads and generates handle reward_model:
type: string
description: Unique identifier for the reward model
# TODO: Maybe take local path and api first uploads and generates handle
# which is returned in the repsonse. # which is returned in the repsonse.
prompt_response_path: prompt_response_path:
type: string type: string