mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 02:58:21 +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": {
|
||||
"/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": {
|
||||
"get": {
|
||||
"responses": {
|
||||
|
@ -2365,6 +2387,84 @@
|
|||
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
|
||||
"components": {
|
||||
"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": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -5208,69 +5308,6 @@
|
|||
"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": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -6164,21 +6201,6 @@
|
|||
"data"
|
||||
]
|
||||
},
|
||||
"ListEvalTasksResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/EvalTask"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
},
|
||||
"ListModelsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
110
docs/_static/llama-stack-spec.yaml
vendored
110
docs/_static/llama-stack-spec.yaml
vendored
|
@ -10,6 +10,20 @@ info:
|
|||
servers:
|
||||
- url: http://any-hosted-llama-stack.com
|
||||
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:
|
||||
get:
|
||||
responses:
|
||||
|
@ -1429,6 +1443,54 @@ jsonSchemaDialect: >-
|
|||
https://json-schema.org/draft/2020-12/schema
|
||||
components:
|
||||
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:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -3354,44 +3416,6 @@ components:
|
|||
additionalProperties: false
|
||||
required:
|
||||
- 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:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -3930,16 +3954,6 @@ components:
|
|||
additionalProperties: false
|
||||
required:
|
||||
- data
|
||||
ListEvalTasksResponse:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/EvalTask'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- data
|
||||
ListModelsResponse:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
@ -644,7 +644,10 @@ class Generator:
|
|||
else:
|
||||
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(
|
||||
tags=[op.defining_class.__name__],
|
||||
summary=None,
|
||||
|
@ -654,6 +657,7 @@ class Generator:
|
|||
requestBody=requestBody,
|
||||
responses=responses,
|
||||
callbacks=callbacks,
|
||||
deprecated=True if "DEPRECATED" in op.func_name else None,
|
||||
security=[] if op.public else None,
|
||||
)
|
||||
|
||||
|
|
|
@ -117,6 +117,7 @@ class Operation:
|
|||
requestBody: Optional[RequestBody] = None
|
||||
callbacks: Optional[Dict[str, "Callback"]] = None
|
||||
security: Optional[List["SecurityRequirement"]] = None
|
||||
deprecated: Optional[bool] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -45,6 +45,11 @@ class ListEvalTasksResponse(BaseModel):
|
|||
|
||||
@runtime_checkable
|
||||
class EvalTasks(Protocol):
|
||||
@webmethod(route="/eval-tasks", method="GET")
|
||||
async def DEPRECATED_list_eval_tasks_deprecated(
|
||||
self,
|
||||
) -> ListEvalTasksResponse: ...
|
||||
|
||||
@webmethod(route="/eval/tasks", method="GET")
|
||||
async def list_eval_tasks(self) -> ListEvalTasksResponse: ...
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue