run openapi generator

This commit is contained in:
Xi Yan 2024-10-30 16:17:35 -07:00
parent 4aa1bf6a60
commit 3b1917d5ea
2 changed files with 88 additions and 168 deletions

View file

@ -21,7 +21,7 @@
"info": { "info": {
"title": "[DRAFT] Llama Stack Specification", "title": "[DRAFT] Llama Stack Specification",
"version": "0.0.1", "version": "0.0.1",
"description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-10-24 17:40:59.576117" "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-10-30 16:17:03.919702"
}, },
"servers": [ "servers": [
{ {
@ -934,7 +934,7 @@
"schema": { "schema": {
"oneOf": [ "oneOf": [
{ {
"$ref": "#/components/schemas/ScoringFunctionDefWithProvider" "$ref": "#/components/schemas/ScoringFnDefWithProvider"
}, },
{ {
"type": "null" "type": "null"
@ -1555,7 +1555,7 @@
"content": { "content": {
"application/jsonl": { "application/jsonl": {
"schema": { "schema": {
"$ref": "#/components/schemas/ScoringFunctionDefWithProvider" "$ref": "#/components/schemas/ScoringFnDefWithProvider"
} }
} }
} }
@ -2762,7 +2762,7 @@
"const": "json_schema", "const": "json_schema",
"default": "json_schema" "default": "json_schema"
}, },
"schema": { "json_schema": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"oneOf": [ "oneOf": [
@ -2791,7 +2791,7 @@
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"type", "type",
"schema" "json_schema"
] ]
}, },
{ {
@ -3018,7 +3018,7 @@
"const": "json_schema", "const": "json_schema",
"default": "json_schema" "default": "json_schema"
}, },
"schema": { "json_schema": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"oneOf": [ "oneOf": [
@ -3047,7 +3047,7 @@
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"type", "type",
"schema" "json_schema"
] ]
}, },
{ {
@ -5004,24 +5004,6 @@
"type" "type"
] ]
}, },
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "custom",
"default": "custom"
},
"validator_class": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"validator_class"
]
},
{ {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5304,24 +5286,6 @@
"type" "type"
] ]
}, },
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "custom",
"default": "custom"
},
"validator_class": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"validator_class"
]
},
{ {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5376,7 +5340,7 @@
"type" "type"
] ]
}, },
"ScoringFunctionDefWithProvider": { "ScoringFnDefWithProvider": {
"type": "object", "type": "object",
"properties": { "properties": {
"identifier": { "identifier": {
@ -5516,24 +5480,6 @@
"type" "type"
] ]
}, },
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "custom",
"default": "custom"
},
"validator_class": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"validator_class"
]
},
{ {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5586,6 +5532,12 @@
}, },
"prompt_template": { "prompt_template": {
"type": "string" "type": "string"
},
"judge_score_regex": {
"type": "array",
"items": {
"type": "string"
}
} }
}, },
"additionalProperties": false, "additionalProperties": false,
@ -6339,10 +6291,10 @@
"finetuned_model": { "finetuned_model": {
"$ref": "#/components/schemas/URL" "$ref": "#/components/schemas/URL"
}, },
"dataset": { "dataset_id": {
"type": "string" "type": "string"
}, },
"validation_dataset": { "validation_dataset_id": {
"type": "string" "type": "string"
}, },
"algorithm": { "algorithm": {
@ -6412,8 +6364,8 @@
"required": [ "required": [
"job_uuid", "job_uuid",
"finetuned_model", "finetuned_model",
"dataset", "dataset_id",
"validation_dataset", "validation_dataset_id",
"algorithm", "algorithm",
"algorithm_config", "algorithm_config",
"optimizer_config", "optimizer_config",
@ -6595,7 +6547,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"function_def": { "function_def": {
"$ref": "#/components/schemas/ScoringFunctionDefWithProvider" "$ref": "#/components/schemas/ScoringFnDefWithProvider"
} }
}, },
"additionalProperties": false, "additionalProperties": false,
@ -6893,10 +6845,10 @@
"model": { "model": {
"type": "string" "type": "string"
}, },
"dataset": { "dataset_id": {
"type": "string" "type": "string"
}, },
"validation_dataset": { "validation_dataset_id": {
"type": "string" "type": "string"
}, },
"algorithm": { "algorithm": {
@ -6976,8 +6928,8 @@
"required": [ "required": [
"job_uuid", "job_uuid",
"model", "model",
"dataset", "dataset_id",
"validation_dataset", "validation_dataset_id",
"algorithm", "algorithm",
"algorithm_config", "algorithm_config",
"optimizer_config", "optimizer_config",
@ -7103,13 +7055,10 @@
], ],
"tags": [ "tags": [
{ {
"name": "Eval" "name": "Inference"
}, },
{ {
"name": "ScoringFunctions" "name": "Memory"
},
{
"name": "SyntheticDataGeneration"
}, },
{ {
"name": "Inspect" "name": "Inspect"
@ -7120,32 +7069,11 @@
{ {
"name": "Models" "name": "Models"
}, },
{
"name": "Safety"
},
{
"name": "MemoryBanks"
},
{
"name": "DatasetIO"
},
{
"name": "Memory"
},
{ {
"name": "Scoring" "name": "Scoring"
}, },
{ {
"name": "Shields" "name": "DatasetIO"
},
{
"name": "Datasets"
},
{
"name": "Inference"
},
{
"name": "Telemetry"
}, },
{ {
"name": "BatchInference" "name": "BatchInference"
@ -7153,6 +7081,30 @@
{ {
"name": "Agents" "name": "Agents"
}, },
{
"name": "Shields"
},
{
"name": "MemoryBanks"
},
{
"name": "Datasets"
},
{
"name": "SyntheticDataGeneration"
},
{
"name": "Eval"
},
{
"name": "Telemetry"
},
{
"name": "ScoringFunctions"
},
{
"name": "Safety"
},
{ {
"name": "BuiltinTool", "name": "BuiltinTool",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BuiltinTool\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BuiltinTool\" />"
@ -7486,8 +7438,8 @@
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Parameter\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Parameter\" />"
}, },
{ {
"name": "ScoringFunctionDefWithProvider", "name": "ScoringFnDefWithProvider",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringFunctionDefWithProvider\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringFnDefWithProvider\" />"
}, },
{ {
"name": "ShieldDefWithProvider", "name": "ShieldDefWithProvider",
@ -7805,7 +7757,7 @@
"ScoreBatchResponse", "ScoreBatchResponse",
"ScoreRequest", "ScoreRequest",
"ScoreResponse", "ScoreResponse",
"ScoringFunctionDefWithProvider", "ScoringFnDefWithProvider",
"ScoringResult", "ScoringResult",
"SearchToolDefinition", "SearchToolDefinition",
"Session", "Session",

View file

@ -360,7 +360,7 @@ components:
oneOf: oneOf:
- additionalProperties: false - additionalProperties: false
properties: properties:
schema: json_schema:
additionalProperties: additionalProperties:
oneOf: oneOf:
- type: 'null' - type: 'null'
@ -376,7 +376,7 @@ components:
type: string type: string
required: required:
- type - type
- schema - json_schema
type: object type: object
- additionalProperties: false - additionalProperties: false
properties: properties:
@ -541,7 +541,7 @@ components:
oneOf: oneOf:
- additionalProperties: false - additionalProperties: false
properties: properties:
schema: json_schema:
additionalProperties: additionalProperties:
oneOf: oneOf:
- type: 'null' - type: 'null'
@ -557,7 +557,7 @@ components:
type: string type: string
required: required:
- type - type
- schema - json_schema
type: object type: object
- additionalProperties: false - additionalProperties: false
properties: properties:
@ -747,18 +747,6 @@ components:
required: required:
- type - type
type: object type: object
- additionalProperties: false
properties:
type:
const: custom
default: custom
type: string
validator_class:
type: string
required:
- type
- validator_class
type: object
- additionalProperties: false - additionalProperties: false
properties: properties:
type: type:
@ -1575,18 +1563,6 @@ components:
required: required:
- type - type
type: object type: object
- additionalProperties: false
properties:
type:
const: custom
default: custom
type: string
validator_class:
type: string
required:
- type
- validator_class
type: object
- additionalProperties: false - additionalProperties: false
properties: properties:
type: type:
@ -1724,7 +1700,7 @@ components:
$ref: '#/components/schemas/RLHFAlgorithm' $ref: '#/components/schemas/RLHFAlgorithm'
algorithm_config: algorithm_config:
$ref: '#/components/schemas/DPOAlignmentConfig' $ref: '#/components/schemas/DPOAlignmentConfig'
dataset: dataset_id:
type: string type: string
finetuned_model: finetuned_model:
$ref: '#/components/schemas/URL' $ref: '#/components/schemas/URL'
@ -1754,13 +1730,13 @@ components:
$ref: '#/components/schemas/OptimizerConfig' $ref: '#/components/schemas/OptimizerConfig'
training_config: training_config:
$ref: '#/components/schemas/TrainingConfig' $ref: '#/components/schemas/TrainingConfig'
validation_dataset: validation_dataset_id:
type: string type: string
required: required:
- job_uuid - job_uuid
- finetuned_model - finetuned_model
- dataset - dataset_id
- validation_dataset - validation_dataset_id
- algorithm - algorithm
- algorithm_config - algorithm_config
- optimizer_config - optimizer_config
@ -1899,7 +1875,7 @@ components:
additionalProperties: false additionalProperties: false
properties: properties:
function_def: function_def:
$ref: '#/components/schemas/ScoringFunctionDefWithProvider' $ref: '#/components/schemas/ScoringFnDefWithProvider'
required: required:
- function_def - function_def
type: object type: object
@ -2121,7 +2097,7 @@ components:
required: required:
- results - results
type: object type: object
ScoringFunctionDefWithProvider: ScoringFnDefWithProvider:
additionalProperties: false additionalProperties: false
properties: properties:
context: context:
@ -2129,6 +2105,10 @@ components:
properties: properties:
judge_model: judge_model:
type: string type: string
judge_score_regex:
items:
type: string
type: array
prompt_template: prompt_template:
type: string type: string
required: required:
@ -2219,18 +2199,6 @@ components:
required: required:
- type - type
type: object type: object
- additionalProperties: false
properties:
type:
const: custom
default: custom
type: string
validator_class:
type: string
required:
- type
- validator_class
type: object
- additionalProperties: false - additionalProperties: false
properties: properties:
type: type:
@ -2484,7 +2452,7 @@ components:
- $ref: '#/components/schemas/LoraFinetuningConfig' - $ref: '#/components/schemas/LoraFinetuningConfig'
- $ref: '#/components/schemas/QLoraFinetuningConfig' - $ref: '#/components/schemas/QLoraFinetuningConfig'
- $ref: '#/components/schemas/DoraFinetuningConfig' - $ref: '#/components/schemas/DoraFinetuningConfig'
dataset: dataset_id:
type: string type: string
hyperparam_search_config: hyperparam_search_config:
additionalProperties: additionalProperties:
@ -2514,13 +2482,13 @@ components:
$ref: '#/components/schemas/OptimizerConfig' $ref: '#/components/schemas/OptimizerConfig'
training_config: training_config:
$ref: '#/components/schemas/TrainingConfig' $ref: '#/components/schemas/TrainingConfig'
validation_dataset: validation_dataset_id:
type: string type: string
required: required:
- job_uuid - job_uuid
- model - model
- dataset - dataset_id
- validation_dataset - validation_dataset_id
- algorithm - algorithm
- algorithm_config - algorithm_config
- optimizer_config - optimizer_config
@ -3029,7 +2997,7 @@ info:
description: "This is the specification of the llama stack that provides\n \ description: "This is the specification of the llama stack that provides\n \
\ a set of endpoints and their corresponding interfaces that are tailored\ \ a set of endpoints and their corresponding interfaces that are tailored\
\ to\n best leverage Llama Models. The specification is still in\ \ to\n best leverage Llama Models. The specification is still in\
\ draft and subject to change.\n Generated at 2024-10-24 17:40:59.576117" \ draft and subject to change.\n Generated at 2024-10-30 16:17:03.919702"
title: '[DRAFT] Llama Stack Specification' title: '[DRAFT] Llama Stack Specification'
version: 0.0.1 version: 0.0.1
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
@ -4122,7 +4090,7 @@ paths:
application/json: application/json:
schema: schema:
oneOf: oneOf:
- $ref: '#/components/schemas/ScoringFunctionDefWithProvider' - $ref: '#/components/schemas/ScoringFnDefWithProvider'
- type: 'null' - type: 'null'
description: OK description: OK
tags: tags:
@ -4142,7 +4110,7 @@ paths:
content: content:
application/jsonl: application/jsonl:
schema: schema:
$ref: '#/components/schemas/ScoringFunctionDefWithProvider' $ref: '#/components/schemas/ScoringFnDefWithProvider'
description: OK description: OK
tags: tags:
- ScoringFunctions - ScoringFunctions
@ -4308,23 +4276,23 @@ security:
servers: servers:
- url: http://any-hosted-llama-stack.com - url: http://any-hosted-llama-stack.com
tags: tags:
- name: Eval - name: Inference
- name: ScoringFunctions - name: Memory
- name: SyntheticDataGeneration
- name: Inspect - name: Inspect
- name: PostTraining - name: PostTraining
- name: Models - name: Models
- name: Safety
- name: MemoryBanks
- name: DatasetIO
- name: Memory
- name: Scoring - name: Scoring
- name: Shields - name: DatasetIO
- name: Datasets
- name: Inference
- name: Telemetry
- name: BatchInference - name: BatchInference
- name: Agents - name: Agents
- name: Shields
- name: MemoryBanks
- name: Datasets
- name: SyntheticDataGeneration
- name: Eval
- name: Telemetry
- name: ScoringFunctions
- name: Safety
- description: <SchemaDefinition schemaRef="#/components/schemas/BuiltinTool" /> - description: <SchemaDefinition schemaRef="#/components/schemas/BuiltinTool" />
name: BuiltinTool name: BuiltinTool
- description: <SchemaDefinition schemaRef="#/components/schemas/CompletionMessage" - description: <SchemaDefinition schemaRef="#/components/schemas/CompletionMessage"
@ -4577,9 +4545,9 @@ tags:
name: PaginatedRowsResult name: PaginatedRowsResult
- description: <SchemaDefinition schemaRef="#/components/schemas/Parameter" /> - description: <SchemaDefinition schemaRef="#/components/schemas/Parameter" />
name: Parameter name: Parameter
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoringFunctionDefWithProvider" - description: <SchemaDefinition schemaRef="#/components/schemas/ScoringFnDefWithProvider"
/> />
name: ScoringFunctionDefWithProvider name: ScoringFnDefWithProvider
- description: <SchemaDefinition schemaRef="#/components/schemas/ShieldDefWithProvider" - description: <SchemaDefinition schemaRef="#/components/schemas/ShieldDefWithProvider"
/> />
name: ShieldDefWithProvider name: ShieldDefWithProvider
@ -4844,7 +4812,7 @@ x-tagGroups:
- ScoreBatchResponse - ScoreBatchResponse
- ScoreRequest - ScoreRequest
- ScoreResponse - ScoreResponse
- ScoringFunctionDefWithProvider - ScoringFnDefWithProvider
- ScoringResult - ScoringResult
- SearchToolDefinition - SearchToolDefinition
- Session - Session