mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-06 20:44:58 +00:00
revert openai_compat changes and use OpenAIMixin for openai_chat_completion
This commit is contained in:
parent
0f5bef893a
commit
a6baa7b3d4
9 changed files with 23 additions and 303 deletions
83
docs/_static/llama-stack-spec.html
vendored
83
docs/_static/llama-stack-spec.html
vendored
|
@ -6372,9 +6372,6 @@
|
|||
"$ref": "#/components/schemas/TokenLogProbs"
|
||||
},
|
||||
"description": "Optional log probabilities for generated tokens"
|
||||
},
|
||||
"usage": {
|
||||
"$ref": "#/components/schemas/UsageInfo"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
@ -6433,31 +6430,6 @@
|
|||
"title": "TokenLogProbs",
|
||||
"description": "Log probabilities for generated tokens."
|
||||
},
|
||||
"UsageInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"completion_tokens": {
|
||||
"type": "integer",
|
||||
"description": "Number of tokens generated"
|
||||
},
|
||||
"prompt_tokens": {
|
||||
"type": "integer",
|
||||
"description": "Number of tokens in the prompt"
|
||||
},
|
||||
"total_tokens": {
|
||||
"type": "integer",
|
||||
"description": "Total number of tokens processed"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"completion_tokens",
|
||||
"prompt_tokens",
|
||||
"total_tokens"
|
||||
],
|
||||
"title": "UsageInfo",
|
||||
"description": "Usage information for a model."
|
||||
},
|
||||
"BatchCompletionRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -10967,31 +10939,6 @@
|
|||
"title": "OpenAIChatCompletionToolCallFunction",
|
||||
"description": "Function call details for OpenAI-compatible tool calls."
|
||||
},
|
||||
"OpenAIChatCompletionUsage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"prompt_tokens": {
|
||||
"type": "integer",
|
||||
"description": "The number of tokens in the prompt"
|
||||
},
|
||||
"completion_tokens": {
|
||||
"type": "integer",
|
||||
"description": "The number of tokens in the completion"
|
||||
},
|
||||
"total_tokens": {
|
||||
"type": "integer",
|
||||
"description": "The total number of tokens used"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"prompt_tokens",
|
||||
"completion_tokens",
|
||||
"total_tokens"
|
||||
],
|
||||
"title": "OpenAIChatCompletionUsage",
|
||||
"description": "Usage information for an OpenAI-compatible chat completion response."
|
||||
},
|
||||
"OpenAIChoice": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -11329,13 +11276,6 @@
|
|||
"OpenAICompletionWithInputMessages": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metrics": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/MetricInResponse"
|
||||
},
|
||||
"description": "(Optional) List of metrics associated with the API response"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the chat completion"
|
||||
|
@ -11361,9 +11301,6 @@
|
|||
"type": "string",
|
||||
"description": "The model that was used to generate the chat completion"
|
||||
},
|
||||
"usage": {
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionUsage"
|
||||
},
|
||||
"input_messages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -13125,13 +13062,6 @@
|
|||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metrics": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/MetricInResponse"
|
||||
},
|
||||
"description": "(Optional) List of metrics associated with the API response"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the chat completion"
|
||||
|
@ -13157,9 +13087,6 @@
|
|||
"type": "string",
|
||||
"description": "The model that was used to generate the chat completion"
|
||||
},
|
||||
"usage": {
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionUsage"
|
||||
},
|
||||
"input_messages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -14551,13 +14478,6 @@
|
|||
"OpenAIChatCompletion": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metrics": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/MetricInResponse"
|
||||
},
|
||||
"description": "(Optional) List of metrics associated with the API response"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the chat completion"
|
||||
|
@ -14582,9 +14502,6 @@
|
|||
"model": {
|
||||
"type": "string",
|
||||
"description": "The model that was used to generate the chat completion"
|
||||
},
|
||||
"usage": {
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionUsage"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
65
docs/_static/llama-stack-spec.yaml
vendored
65
docs/_static/llama-stack-spec.yaml
vendored
|
@ -4548,8 +4548,6 @@ components:
|
|||
$ref: '#/components/schemas/TokenLogProbs'
|
||||
description: >-
|
||||
Optional log probabilities for generated tokens
|
||||
usage:
|
||||
$ref: '#/components/schemas/UsageInfo'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- completion_message
|
||||
|
@ -4591,25 +4589,6 @@ components:
|
|||
- logprobs_by_token
|
||||
title: TokenLogProbs
|
||||
description: Log probabilities for generated tokens.
|
||||
UsageInfo:
|
||||
type: object
|
||||
properties:
|
||||
completion_tokens:
|
||||
type: integer
|
||||
description: Number of tokens generated
|
||||
prompt_tokens:
|
||||
type: integer
|
||||
description: Number of tokens in the prompt
|
||||
total_tokens:
|
||||
type: integer
|
||||
description: Total number of tokens processed
|
||||
additionalProperties: false
|
||||
required:
|
||||
- completion_tokens
|
||||
- prompt_tokens
|
||||
- total_tokens
|
||||
title: UsageInfo
|
||||
description: Usage information for a model.
|
||||
BatchCompletionRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -8124,26 +8103,6 @@ components:
|
|||
title: OpenAIChatCompletionToolCallFunction
|
||||
description: >-
|
||||
Function call details for OpenAI-compatible tool calls.
|
||||
OpenAIChatCompletionUsage:
|
||||
type: object
|
||||
properties:
|
||||
prompt_tokens:
|
||||
type: integer
|
||||
description: The number of tokens in the prompt
|
||||
completion_tokens:
|
||||
type: integer
|
||||
description: The number of tokens in the completion
|
||||
total_tokens:
|
||||
type: integer
|
||||
description: The total number of tokens used
|
||||
additionalProperties: false
|
||||
required:
|
||||
- prompt_tokens
|
||||
- completion_tokens
|
||||
- total_tokens
|
||||
title: OpenAIChatCompletionUsage
|
||||
description: >-
|
||||
Usage information for an OpenAI-compatible chat completion response.
|
||||
OpenAIChoice:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -8406,12 +8365,6 @@ components:
|
|||
OpenAICompletionWithInputMessages:
|
||||
type: object
|
||||
properties:
|
||||
metrics:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MetricInResponse'
|
||||
description: >-
|
||||
(Optional) List of metrics associated with the API response
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the chat completion
|
||||
|
@ -8434,8 +8387,6 @@ components:
|
|||
type: string
|
||||
description: >-
|
||||
The model that was used to generate the chat completion
|
||||
usage:
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionUsage'
|
||||
input_messages:
|
||||
type: array
|
||||
items:
|
||||
|
@ -9731,12 +9682,6 @@ components:
|
|||
items:
|
||||
type: object
|
||||
properties:
|
||||
metrics:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MetricInResponse'
|
||||
description: >-
|
||||
(Optional) List of metrics associated with the API response
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the chat completion
|
||||
|
@ -9759,8 +9704,6 @@ components:
|
|||
type: string
|
||||
description: >-
|
||||
The model that was used to generate the chat completion
|
||||
usage:
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionUsage'
|
||||
input_messages:
|
||||
type: array
|
||||
items:
|
||||
|
@ -10776,12 +10719,6 @@ components:
|
|||
OpenAIChatCompletion:
|
||||
type: object
|
||||
properties:
|
||||
metrics:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MetricInResponse'
|
||||
description: >-
|
||||
(Optional) List of metrics associated with the API response
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the chat completion
|
||||
|
@ -10804,8 +10741,6 @@ components:
|
|||
type: string
|
||||
description: >-
|
||||
The model that was used to generate the chat completion
|
||||
usage:
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionUsage'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue