mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-09 19:58:29 +00:00
deprecation in OpenAPI spec
This commit is contained in:
parent
e013b9066c
commit
79e7253625
5 changed files with 173 additions and 127 deletions
178
docs/_static/llama-stack-spec.html
vendored
178
docs/_static/llama-stack-spec.html
vendored
|
@ -40,6 +40,28 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/v1/eval-tasks": {
|
||||||
|
"get": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ListEvalTasksResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"EvalTasks"
|
||||||
|
],
|
||||||
|
"description": "",
|
||||||
|
"parameters": [],
|
||||||
|
"deprecated": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/datasetio/rows": {
|
"/v1/datasetio/rows": {
|
||||||
"get": {
|
"get": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -2365,6 +2387,84 @@
|
||||||
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
|
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"EvalTask": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"identifier": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"provider_resource_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"provider_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"const": "eval_task",
|
||||||
|
"default": "eval_task"
|
||||||
|
},
|
||||||
|
"dataset_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"scoring_functions": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"identifier",
|
||||||
|
"provider_resource_id",
|
||||||
|
"provider_id",
|
||||||
|
"type",
|
||||||
|
"dataset_id",
|
||||||
|
"scoring_functions",
|
||||||
|
"metadata"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ListEvalTasksResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/EvalTask"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"data"
|
||||||
|
]
|
||||||
|
},
|
||||||
"AppendRowsRequest": {
|
"AppendRowsRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -5208,69 +5308,6 @@
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EvalTask": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"identifier": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"provider_resource_id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"provider_id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"type": "string",
|
|
||||||
"const": "eval_task",
|
|
||||||
"default": "eval_task"
|
|
||||||
},
|
|
||||||
"dataset_id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"scoring_functions": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"metadata": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "array"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"provider_resource_id",
|
|
||||||
"provider_id",
|
|
||||||
"type",
|
|
||||||
"dataset_id",
|
|
||||||
"scoring_functions",
|
|
||||||
"metadata"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Model": {
|
"Model": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -6164,21 +6201,6 @@
|
||||||
"data"
|
"data"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ListEvalTasksResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"data": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/EvalTask"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"data"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ListModelsResponse": {
|
"ListModelsResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
110
docs/_static/llama-stack-spec.yaml
vendored
110
docs/_static/llama-stack-spec.yaml
vendored
|
@ -10,6 +10,20 @@ info:
|
||||||
servers:
|
servers:
|
||||||
- url: http://any-hosted-llama-stack.com
|
- url: http://any-hosted-llama-stack.com
|
||||||
paths:
|
paths:
|
||||||
|
/v1/eval-tasks:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListEvalTasksResponse'
|
||||||
|
tags:
|
||||||
|
- EvalTasks
|
||||||
|
description: ''
|
||||||
|
parameters: []
|
||||||
|
deprecated: true
|
||||||
/v1/datasetio/rows:
|
/v1/datasetio/rows:
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
|
@ -1429,6 +1443,54 @@ jsonSchemaDialect: >-
|
||||||
https://json-schema.org/draft/2020-12/schema
|
https://json-schema.org/draft/2020-12/schema
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
EvalTask:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
provider_resource_id:
|
||||||
|
type: string
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: eval_task
|
||||||
|
default: eval_task
|
||||||
|
dataset_id:
|
||||||
|
type: string
|
||||||
|
scoring_functions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_resource_id
|
||||||
|
- provider_id
|
||||||
|
- type
|
||||||
|
- dataset_id
|
||||||
|
- scoring_functions
|
||||||
|
- metadata
|
||||||
|
ListEvalTasksResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/EvalTask'
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- data
|
||||||
AppendRowsRequest:
|
AppendRowsRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -3354,44 +3416,6 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
EvalTask:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
identifier:
|
|
||||||
type: string
|
|
||||||
provider_resource_id:
|
|
||||||
type: string
|
|
||||||
provider_id:
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
const: eval_task
|
|
||||||
default: eval_task
|
|
||||||
dataset_id:
|
|
||||||
type: string
|
|
||||||
scoring_functions:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- identifier
|
|
||||||
- provider_resource_id
|
|
||||||
- provider_id
|
|
||||||
- type
|
|
||||||
- dataset_id
|
|
||||||
- scoring_functions
|
|
||||||
- metadata
|
|
||||||
Model:
|
Model:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -3930,16 +3954,6 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- data
|
- data
|
||||||
ListEvalTasksResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
data:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/EvalTask'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- data
|
|
||||||
ListModelsResponse:
|
ListModelsResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -644,7 +644,10 @@ class Generator:
|
||||||
else:
|
else:
|
||||||
callbacks = None
|
callbacks = None
|
||||||
|
|
||||||
description = "\n".join(filter(None, [doc_string.short_description, doc_string.long_description]))
|
description = "\n".join(
|
||||||
|
filter(None, [doc_string.short_description, doc_string.long_description])
|
||||||
|
)
|
||||||
|
|
||||||
return Operation(
|
return Operation(
|
||||||
tags=[op.defining_class.__name__],
|
tags=[op.defining_class.__name__],
|
||||||
summary=None,
|
summary=None,
|
||||||
|
@ -654,6 +657,7 @@ class Generator:
|
||||||
requestBody=requestBody,
|
requestBody=requestBody,
|
||||||
responses=responses,
|
responses=responses,
|
||||||
callbacks=callbacks,
|
callbacks=callbacks,
|
||||||
|
deprecated=True if "DEPRECATED" in op.func_name else None,
|
||||||
security=[] if op.public else None,
|
security=[] if op.public else None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@ class Operation:
|
||||||
requestBody: Optional[RequestBody] = None
|
requestBody: Optional[RequestBody] = None
|
||||||
callbacks: Optional[Dict[str, "Callback"]] = None
|
callbacks: Optional[Dict[str, "Callback"]] = None
|
||||||
security: Optional[List["SecurityRequirement"]] = None
|
security: Optional[List["SecurityRequirement"]] = None
|
||||||
|
deprecated: Optional[bool] = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
|
@ -45,6 +45,11 @@ class ListEvalTasksResponse(BaseModel):
|
||||||
|
|
||||||
@runtime_checkable
|
@runtime_checkable
|
||||||
class EvalTasks(Protocol):
|
class EvalTasks(Protocol):
|
||||||
|
@webmethod(route="/eval-tasks", method="GET")
|
||||||
|
async def DEPRECATED_list_eval_tasks_deprecated(
|
||||||
|
self,
|
||||||
|
) -> ListEvalTasksResponse: ...
|
||||||
|
|
||||||
@webmethod(route="/eval/tasks", method="GET")
|
@webmethod(route="/eval/tasks", method="GET")
|
||||||
async def list_eval_tasks(self) -> ListEvalTasksResponse: ...
|
async def list_eval_tasks(self) -> ListEvalTasksResponse: ...
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue