mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-14 16:52:37 +00:00
chore: remove deprecated /openai/v1/ routes
Removed all 39 deprecated /openai/v1/* routes across the API layer. These were duplicate routes that have equivalent non-OpenAI paths (e.g., /batches instead of /openai/v1/batches). The standard routes remain fully functional.
This commit is contained in:
parent
cb40da210f
commit
1b9c2fc15e
11 changed files with 0 additions and 7096 deletions
|
|
@ -1129,31 +1129,6 @@ paths:
|
||||||
$ref: '#/components/schemas/RunModerationRequest'
|
$ref: '#/components/schemas/RunModerationRequest'
|
||||||
required: true
|
required: true
|
||||||
deprecated: false
|
deprecated: false
|
||||||
/v1/openai/v1/models:
|
|
||||||
get:
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: A OpenAIListModelsResponse.
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OpenAIListModelsResponse'
|
|
||||||
'400':
|
|
||||||
$ref: '#/components/responses/BadRequest400'
|
|
||||||
'429':
|
|
||||||
$ref: >-
|
|
||||||
#/components/responses/TooManyRequests429
|
|
||||||
'500':
|
|
||||||
$ref: >-
|
|
||||||
#/components/responses/InternalServerError500
|
|
||||||
default:
|
|
||||||
$ref: '#/components/responses/DefaultError'
|
|
||||||
tags:
|
|
||||||
- Models
|
|
||||||
summary: List models using the OpenAI API.
|
|
||||||
description: List models using the OpenAI API.
|
|
||||||
parameters: []
|
|
||||||
deprecated: false
|
|
||||||
/v1/prompts:
|
/v1/prompts:
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -7020,48 +6995,6 @@ components:
|
||||||
- metadata
|
- metadata
|
||||||
title: ModerationObjectResults
|
title: ModerationObjectResults
|
||||||
description: A moderation object.
|
description: A moderation object.
|
||||||
OpenAIModel:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
object:
|
|
||||||
type: string
|
|
||||||
const: model
|
|
||||||
default: model
|
|
||||||
created:
|
|
||||||
type: integer
|
|
||||||
owned_by:
|
|
||||||
type: string
|
|
||||||
custom_metadata:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- object
|
|
||||||
- created
|
|
||||||
- owned_by
|
|
||||||
title: OpenAIModel
|
|
||||||
description: A model from OpenAI.
|
|
||||||
OpenAIListModelsResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
data:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/OpenAIModel'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- data
|
|
||||||
title: OpenAIListModelsResponse
|
|
||||||
Prompt:
|
Prompt:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
6788
docs/static/deprecated-llama-stack-spec.yaml
vendored
6788
docs/static/deprecated-llama-stack-spec.yaml
vendored
File diff suppressed because it is too large
Load diff
67
docs/static/llama-stack-spec.yaml
vendored
67
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -1126,31 +1126,6 @@ paths:
|
||||||
$ref: '#/components/schemas/RunModerationRequest'
|
$ref: '#/components/schemas/RunModerationRequest'
|
||||||
required: true
|
required: true
|
||||||
deprecated: false
|
deprecated: false
|
||||||
/v1/openai/v1/models:
|
|
||||||
get:
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: A OpenAIListModelsResponse.
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OpenAIListModelsResponse'
|
|
||||||
'400':
|
|
||||||
$ref: '#/components/responses/BadRequest400'
|
|
||||||
'429':
|
|
||||||
$ref: >-
|
|
||||||
#/components/responses/TooManyRequests429
|
|
||||||
'500':
|
|
||||||
$ref: >-
|
|
||||||
#/components/responses/InternalServerError500
|
|
||||||
default:
|
|
||||||
$ref: '#/components/responses/DefaultError'
|
|
||||||
tags:
|
|
||||||
- Models
|
|
||||||
summary: List models using the OpenAI API.
|
|
||||||
description: List models using the OpenAI API.
|
|
||||||
parameters: []
|
|
||||||
deprecated: false
|
|
||||||
/v1/prompts:
|
/v1/prompts:
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -5807,48 +5782,6 @@ components:
|
||||||
- metadata
|
- metadata
|
||||||
title: ModerationObjectResults
|
title: ModerationObjectResults
|
||||||
description: A moderation object.
|
description: A moderation object.
|
||||||
OpenAIModel:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
object:
|
|
||||||
type: string
|
|
||||||
const: model
|
|
||||||
default: model
|
|
||||||
created:
|
|
||||||
type: integer
|
|
||||||
owned_by:
|
|
||||||
type: string
|
|
||||||
custom_metadata:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- object
|
|
||||||
- created
|
|
||||||
- owned_by
|
|
||||||
title: OpenAIModel
|
|
||||||
description: A model from OpenAI.
|
|
||||||
OpenAIListModelsResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
data:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/OpenAIModel'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- data
|
|
||||||
title: OpenAIListModelsResponse
|
|
||||||
Prompt:
|
Prompt:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
67
docs/static/stainless-llama-stack-spec.yaml
vendored
67
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -1129,31 +1129,6 @@ paths:
|
||||||
$ref: '#/components/schemas/RunModerationRequest'
|
$ref: '#/components/schemas/RunModerationRequest'
|
||||||
required: true
|
required: true
|
||||||
deprecated: false
|
deprecated: false
|
||||||
/v1/openai/v1/models:
|
|
||||||
get:
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: A OpenAIListModelsResponse.
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/OpenAIListModelsResponse'
|
|
||||||
'400':
|
|
||||||
$ref: '#/components/responses/BadRequest400'
|
|
||||||
'429':
|
|
||||||
$ref: >-
|
|
||||||
#/components/responses/TooManyRequests429
|
|
||||||
'500':
|
|
||||||
$ref: >-
|
|
||||||
#/components/responses/InternalServerError500
|
|
||||||
default:
|
|
||||||
$ref: '#/components/responses/DefaultError'
|
|
||||||
tags:
|
|
||||||
- Models
|
|
||||||
summary: List models using the OpenAI API.
|
|
||||||
description: List models using the OpenAI API.
|
|
||||||
parameters: []
|
|
||||||
deprecated: false
|
|
||||||
/v1/prompts:
|
/v1/prompts:
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -7020,48 +6995,6 @@ components:
|
||||||
- metadata
|
- metadata
|
||||||
title: ModerationObjectResults
|
title: ModerationObjectResults
|
||||||
description: A moderation object.
|
description: A moderation object.
|
||||||
OpenAIModel:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
object:
|
|
||||||
type: string
|
|
||||||
const: model
|
|
||||||
default: model
|
|
||||||
created:
|
|
||||||
type: integer
|
|
||||||
owned_by:
|
|
||||||
type: string
|
|
||||||
custom_metadata:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- object
|
|
||||||
- created
|
|
||||||
- owned_by
|
|
||||||
title: OpenAIModel
|
|
||||||
description: A model from OpenAI.
|
|
||||||
OpenAIListModelsResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
data:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/OpenAIModel'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- data
|
|
||||||
title: OpenAIListModelsResponse
|
|
||||||
Prompt:
|
Prompt:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
|
|
@ -787,12 +787,6 @@ class Agents(Protocol):
|
||||||
#
|
#
|
||||||
# Both of these APIs are inherently stateful.
|
# Both of these APIs are inherently stateful.
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/responses/{response_id}",
|
|
||||||
method="GET",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(route="/responses/{response_id}", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/responses/{response_id}", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def get_openai_response(
|
async def get_openai_response(
|
||||||
self,
|
self,
|
||||||
|
|
@ -805,7 +799,6 @@ class Agents(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/responses", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/responses", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/responses", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def create_openai_response(
|
async def create_openai_response(
|
||||||
self,
|
self,
|
||||||
|
|
@ -842,7 +835,6 @@ class Agents(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/responses", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/responses", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/responses", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def list_openai_responses(
|
async def list_openai_responses(
|
||||||
self,
|
self,
|
||||||
|
|
@ -861,9 +853,6 @@ class Agents(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/responses/{response_id}/input_items", method="GET", level=LLAMA_STACK_API_V1, deprecated=True
|
|
||||||
)
|
|
||||||
@webmethod(route="/responses/{response_id}/input_items", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/responses/{response_id}/input_items", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def list_openai_response_input_items(
|
async def list_openai_response_input_items(
|
||||||
self,
|
self,
|
||||||
|
|
@ -886,7 +875,6 @@ class Agents(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/responses/{response_id}", method="DELETE", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/responses/{response_id}", method="DELETE", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/responses/{response_id}", method="DELETE", level=LLAMA_STACK_API_V1)
|
||||||
async def delete_openai_response(self, response_id: str) -> OpenAIDeleteResponseObject:
|
async def delete_openai_response(self, response_id: str) -> OpenAIDeleteResponseObject:
|
||||||
"""Delete a response.
|
"""Delete a response.
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ class Batches(Protocol):
|
||||||
Note: This API is currently under active development and may undergo changes.
|
Note: This API is currently under active development and may undergo changes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/batches", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/batches", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/batches", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def create_batch(
|
async def create_batch(
|
||||||
self,
|
self,
|
||||||
|
|
@ -64,7 +63,6 @@ class Batches(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/batches/{batch_id}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/batches/{batch_id}", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/batches/{batch_id}", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def retrieve_batch(self, batch_id: str) -> BatchObject:
|
async def retrieve_batch(self, batch_id: str) -> BatchObject:
|
||||||
"""Retrieve information about a specific batch.
|
"""Retrieve information about a specific batch.
|
||||||
|
|
@ -74,7 +72,6 @@ class Batches(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/batches/{batch_id}/cancel", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/batches/{batch_id}/cancel", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/batches/{batch_id}/cancel", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def cancel_batch(self, batch_id: str) -> BatchObject:
|
async def cancel_batch(self, batch_id: str) -> BatchObject:
|
||||||
"""Cancel a batch that is in progress.
|
"""Cancel a batch that is in progress.
|
||||||
|
|
@ -84,7 +81,6 @@ class Batches(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/batches", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/batches", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/batches", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def list_batches(
|
async def list_batches(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,6 @@ class Files(Protocol):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# OpenAI Files API Endpoints
|
# OpenAI Files API Endpoints
|
||||||
@webmethod(route="/openai/v1/files", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/files", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/files", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_upload_file(
|
async def openai_upload_file(
|
||||||
self,
|
self,
|
||||||
|
|
@ -134,7 +133,6 @@ class Files(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/files", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/files", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/files", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_list_files(
|
async def openai_list_files(
|
||||||
self,
|
self,
|
||||||
|
|
@ -155,7 +153,6 @@ class Files(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/files/{file_id}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/files/{file_id}", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/files/{file_id}", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_retrieve_file(
|
async def openai_retrieve_file(
|
||||||
self,
|
self,
|
||||||
|
|
@ -170,7 +167,6 @@ class Files(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/files/{file_id}", method="DELETE", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/files/{file_id}", method="DELETE", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/files/{file_id}", method="DELETE", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_delete_file(
|
async def openai_delete_file(
|
||||||
self,
|
self,
|
||||||
|
|
@ -183,7 +179,6 @@ class Files(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/files/{file_id}/content", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/files/{file_id}/content", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/files/{file_id}/content", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_retrieve_file_content(
|
async def openai_retrieve_file_content(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
|
|
@ -1189,7 +1189,6 @@ class InferenceProvider(Protocol):
|
||||||
raise NotImplementedError("Reranking is not implemented")
|
raise NotImplementedError("Reranking is not implemented")
|
||||||
return # this is so mypy's safe-super rule will consider the method concrete
|
return # this is so mypy's safe-super rule will consider the method concrete
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/completions", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/completions", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/completions", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_completion(
|
async def openai_completion(
|
||||||
self,
|
self,
|
||||||
|
|
@ -1202,7 +1201,6 @@ class InferenceProvider(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/chat/completions", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/chat/completions", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/chat/completions", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_chat_completion(
|
async def openai_chat_completion(
|
||||||
self,
|
self,
|
||||||
|
|
@ -1215,7 +1213,6 @@ class InferenceProvider(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/embeddings", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/embeddings", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/embeddings", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_embeddings(
|
async def openai_embeddings(
|
||||||
self,
|
self,
|
||||||
|
|
@ -1240,7 +1237,6 @@ class Inference(InferenceProvider):
|
||||||
- Rerank models: these models reorder the documents based on their relevance to a query.
|
- Rerank models: these models reorder the documents based on their relevance to a query.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/chat/completions", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/chat/completions", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/chat/completions", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def list_chat_completions(
|
async def list_chat_completions(
|
||||||
self,
|
self,
|
||||||
|
|
@ -1259,9 +1255,6 @@ class Inference(InferenceProvider):
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError("List chat completions is not implemented")
|
raise NotImplementedError("List chat completions is not implemented")
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/chat/completions/{completion_id}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True
|
|
||||||
)
|
|
||||||
@webmethod(route="/chat/completions/{completion_id}", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/chat/completions/{completion_id}", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def get_chat_completion(self, completion_id: str) -> OpenAICompletionWithInputMessages:
|
async def get_chat_completion(self, completion_id: str) -> OpenAICompletionWithInputMessages:
|
||||||
"""Get chat completion.
|
"""Get chat completion.
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,6 @@ class Models(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/models", method="GET", level=LLAMA_STACK_API_V1)
|
|
||||||
async def openai_list_models(self) -> OpenAIListModelsResponse:
|
async def openai_list_models(self) -> OpenAIListModelsResponse:
|
||||||
"""List models using the OpenAI API.
|
"""List models using the OpenAI API.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ class Safety(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/moderations", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/moderations", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/moderations", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def run_moderation(self, input: str | list[str], model: str | None = None) -> ModerationObject:
|
async def run_moderation(self, input: str | list[str], model: str | None = None) -> ModerationObject:
|
||||||
"""Create moderation.
|
"""Create moderation.
|
||||||
|
|
|
||||||
|
|
@ -545,7 +545,6 @@ class VectorIO(Protocol):
|
||||||
...
|
...
|
||||||
|
|
||||||
# OpenAI Vector Stores API endpoints
|
# OpenAI Vector Stores API endpoints
|
||||||
@webmethod(route="/openai/v1/vector_stores", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/vector_stores", method="POST", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/vector_stores", method="POST", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_create_vector_store(
|
async def openai_create_vector_store(
|
||||||
self,
|
self,
|
||||||
|
|
@ -558,7 +557,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/vector_stores", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
|
|
||||||
@webmethod(route="/vector_stores", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/vector_stores", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_list_vector_stores(
|
async def openai_list_vector_stores(
|
||||||
self,
|
self,
|
||||||
|
|
@ -577,9 +575,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True
|
|
||||||
)
|
|
||||||
@webmethod(route="/vector_stores/{vector_store_id}", method="GET", level=LLAMA_STACK_API_V1)
|
@webmethod(route="/vector_stores/{vector_store_id}", method="GET", level=LLAMA_STACK_API_V1)
|
||||||
async def openai_retrieve_vector_store(
|
async def openai_retrieve_vector_store(
|
||||||
self,
|
self,
|
||||||
|
|
@ -592,9 +587,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}", method="POST", level=LLAMA_STACK_API_V1, deprecated=True
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}",
|
route="/vector_stores/{vector_store_id}",
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
@ -617,9 +609,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}", method="DELETE", level=LLAMA_STACK_API_V1, deprecated=True
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}",
|
route="/vector_stores/{vector_store_id}",
|
||||||
method="DELETE",
|
method="DELETE",
|
||||||
|
|
@ -636,12 +625,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/search",
|
|
||||||
method="POST",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/search",
|
route="/vector_stores/{vector_store_id}/search",
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
@ -674,12 +657,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/files",
|
|
||||||
method="POST",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/files",
|
route="/vector_stores/{vector_store_id}/files",
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
@ -702,12 +679,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/files",
|
|
||||||
method="GET",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/files",
|
route="/vector_stores/{vector_store_id}/files",
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -734,12 +705,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
||||||
method="GET",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/files/{file_id}",
|
route="/vector_stores/{vector_store_id}/files/{file_id}",
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -758,12 +723,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/files/{file_id}/content",
|
|
||||||
method="GET",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/files/{file_id}/content",
|
route="/vector_stores/{vector_store_id}/files/{file_id}/content",
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -782,12 +741,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
||||||
method="POST",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/files/{file_id}",
|
route="/vector_stores/{vector_store_id}/files/{file_id}",
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
@ -808,12 +761,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
||||||
method="DELETE",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/files/{file_id}",
|
route="/vector_stores/{vector_store_id}/files/{file_id}",
|
||||||
method="DELETE",
|
method="DELETE",
|
||||||
|
|
@ -837,12 +784,6 @@ class VectorIO(Protocol):
|
||||||
method="POST",
|
method="POST",
|
||||||
level=LLAMA_STACK_API_V1,
|
level=LLAMA_STACK_API_V1,
|
||||||
)
|
)
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/file_batches",
|
|
||||||
method="POST",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
async def openai_create_vector_store_file_batch(
|
async def openai_create_vector_store_file_batch(
|
||||||
self,
|
self,
|
||||||
vector_store_id: str,
|
vector_store_id: str,
|
||||||
|
|
@ -861,12 +802,6 @@ class VectorIO(Protocol):
|
||||||
method="GET",
|
method="GET",
|
||||||
level=LLAMA_STACK_API_V1,
|
level=LLAMA_STACK_API_V1,
|
||||||
)
|
)
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}",
|
|
||||||
method="GET",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
async def openai_retrieve_vector_store_file_batch(
|
async def openai_retrieve_vector_store_file_batch(
|
||||||
self,
|
self,
|
||||||
batch_id: str,
|
batch_id: str,
|
||||||
|
|
@ -880,12 +815,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files",
|
|
||||||
method="GET",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/file_batches/{batch_id}/files",
|
route="/vector_stores/{vector_store_id}/file_batches/{batch_id}/files",
|
||||||
method="GET",
|
method="GET",
|
||||||
|
|
@ -914,12 +843,6 @@ class VectorIO(Protocol):
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
@webmethod(
|
|
||||||
route="/openai/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
|
|
||||||
method="POST",
|
|
||||||
level=LLAMA_STACK_API_V1,
|
|
||||||
deprecated=True,
|
|
||||||
)
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
|
route="/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue