mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-16 09:58:10 +00:00
Update reward_model_scoring.yaml
add reward model identifier to the reward model spec
This commit is contained in:
parent
26d780809c
commit
47390bc9a8
1 changed files with 26 additions and 21 deletions
|
@ -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:
|
||||||
schema:
|
application/json:
|
||||||
type: array
|
schema:
|
||||||
items:
|
type: object
|
||||||
$ref: '#/components/schemas/Message'
|
properties:
|
||||||
required: true
|
reward_model:
|
||||||
- in: query
|
type: string
|
||||||
name: response
|
description: Unique identifier for the reward model
|
||||||
schema:
|
messages:
|
||||||
$ref: '#/components/schemas/Completion'
|
type: array
|
||||||
required: true
|
items:
|
||||||
- in: query
|
$ref: '#/components/schemas/Message'
|
||||||
name: scoring_function
|
description: List[Message] same as what is used in /chat_completion api
|
||||||
schema:
|
response:
|
||||||
type: string
|
$ref: '#/components/schemas/Completion'
|
||||||
required: true
|
description: Completion same as what is used in /chat_completion api
|
||||||
|
scoring_function:
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Scoring completed successfully
|
description: Scoring completed successfully
|
||||||
|
@ -138,7 +140,7 @@ paths:
|
||||||
score:
|
score:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
|
|
||||||
/batch_reward_model_scoring/:
|
/batch_reward_model_scoring/:
|
||||||
post:
|
post:
|
||||||
summary: Batch score multiple pairs of prompts and responses
|
summary: Batch score multiple pairs of prompts and responses
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue