diff --git a/source/openapi.html b/source/openapi.html index 605ff235a..f44cae180 100644 --- a/source/openapi.html +++ b/source/openapi.html @@ -1965,7 +1965,7 @@ "prompts": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Message" } }, "filtering_function": { @@ -1980,6 +1980,9 @@ ], "title": "The type of filtering function.", "default": "none" + }, + "reward_scoring": { + "type": "object" } }, "additionalProperties": false, @@ -1989,39 +1992,80 @@ ], "title": "Request to generate synthetic data. A small batch of prompts and a filtering function" }, + "KScoredPromptGenerations": { + "type": "object", + "properties": { + "prompt": { + "$ref": "#/components/schemas/Message" + }, + "k_scored_generations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageScore" + } + } + }, + "additionalProperties": false, + "required": [ + "prompt", + "k_scored_generations" + ] + }, + "MessageScore": { + "type": "object", + "properties": { + "message": { + "$ref": "#/components/schemas/Message" + }, + "score": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "message", + "score" + ], + "title": "A single message and its score." + }, "SyntheticDataGenerationResponse": { "type": "object", "properties": { "synthetic_data": { "type": "array", "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "prefixItems": [ - { - "type": "string" - }, - { - "type": "string" - }, - { - "type": "number" - } - ] + "$ref": "#/components/schemas/KScoredPromptGenerations" } }, "statistics": { "type": "object", "additionalProperties": { - "type": "number" + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] } } }, "additionalProperties": false, "required": [ - "synthetic_data", - "statistics" + "synthetic_data" ], "title": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold." }, @@ -2071,42 +2115,6 @@ ], "title": "Request to score a reward function. A list of prompts and a list of responses per prompt." }, - "KScoredPromptGenerations": { - "type": "object", - "properties": { - "prompt": { - "$ref": "#/components/schemas/Message" - }, - "k_scored_generations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessageScore" - } - } - }, - "additionalProperties": false, - "required": [ - "prompt", - "k_scored_generations" - ] - }, - "MessageScore": { - "type": "object", - "properties": { - "message": { - "$ref": "#/components/schemas/Message" - }, - "score": { - "type": "number" - } - }, - "additionalProperties": false, - "required": [ - "message", - "score" - ], - "title": "A single message and its score." - }, "RewardScoringResponse": { "type": "object", "properties": { @@ -2398,7 +2406,10 @@ ], "tags": [ { - "name": "Finetuning" + "name": "RewardScoring" + }, + { + "name": "Inference" }, { "name": "Datasets" @@ -2407,14 +2418,11 @@ "name": "SyntheticDataGeneration" }, { - "name": "RewardScoring" + "name": "Finetuning" }, { "name": "AgenticSystem" }, - { - "name": "Inference" - }, { "name": "ShieldConfig", "description": "" @@ -2503,14 +2511,6 @@ "name": "SyntheticDataGenerationRequest", "description": "Request to generate synthetic data. A small batch of prompts and a filtering function\n\n" }, - { - "name": "SyntheticDataGenerationResponse", - "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n" - }, - { - "name": "RewardScoringRequest", - "description": "Request to score a reward function. A list of prompts and a list of responses per prompt.\n\n" - }, { "name": "KScoredPromptGenerations", "description": "" @@ -2519,6 +2519,14 @@ "name": "MessageScore", "description": "A single message and its score.\n\n" }, + { + "name": "SyntheticDataGenerationResponse", + "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n" + }, + { + "name": "RewardScoringRequest", + "description": "Request to score a reward function. A list of prompts and a list of responses per prompt.\n\n" + }, { "name": "RewardScoringResponse", "description": "Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold.\n\n" diff --git a/source/openapi.yaml b/source/openapi.yaml index a0e592e12..0cdd6af14 100644 --- a/source/openapi.yaml +++ b/source/openapi.yaml @@ -1157,8 +1157,10 @@ components: type: string prompts: items: - type: string + $ref: '#/components/schemas/Message' type: array + reward_scoring: + type: object required: - prompts - filtering_function @@ -1170,21 +1172,20 @@ components: properties: statistics: additionalProperties: - type: number + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object type: object synthetic_data: items: - maxItems: 3 - minItems: 3 - prefixItems: - - type: string - - type: string - - type: number - type: array + $ref: '#/components/schemas/KScoredPromptGenerations' type: array required: - synthetic_data - - statistics title: Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. type: object @@ -1468,12 +1469,12 @@ security: servers: - url: http://llama.meta.com tags: -- name: Finetuning +- name: RewardScoring +- name: Inference - name: Datasets - name: SyntheticDataGeneration -- name: RewardScoring +- name: Finetuning - name: AgenticSystem -- name: Inference - description: name: ShieldConfig - description: ' name: SyntheticDataGenerationRequest +- description: + name: KScoredPromptGenerations +- description: 'A single message and its score. + + + ' + name: MessageScore - description: 'Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. @@ -1588,14 +1597,6 @@ tags: ' name: RewardScoringRequest -- description: - name: KScoredPromptGenerations -- description: 'A single message and its score. - - - ' - name: MessageScore - description: 'Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold.