mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-12 05:54:38 +00:00
featu: support passing "extra body" throught to providers
# What does this PR do? Allows passing through extra_body parameters to inference providers. closes #2720 ## Test Plan CI and added new test
This commit is contained in:
parent
80d58ab519
commit
c4dbaa9d4c
41 changed files with 3145 additions and 200 deletions
23
docs/static/deprecated-llama-stack-spec.html
vendored
23
docs/static/deprecated-llama-stack-spec.html
vendored
|
@ -1527,7 +1527,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionRequest"
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionRequestWithExtraBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1617,7 +1617,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenAICompletionRequest"
|
||||
"$ref": "#/components/schemas/OpenAICompletionRequestWithExtraBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7522,7 +7522,7 @@
|
|||
"title": "OpenAIResponseFormatText",
|
||||
"description": "Text response format for OpenAI-compatible chat completion requests."
|
||||
},
|
||||
"OpenAIChatCompletionRequest": {
|
||||
"OpenAIChatCompletionRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
|
@ -7769,7 +7769,7 @@
|
|||
"model",
|
||||
"messages"
|
||||
],
|
||||
"title": "OpenAIChatCompletionRequest",
|
||||
"title": "OpenAIChatCompletionRequestWithExtraBody",
|
||||
"description": "Request parameters for OpenAI-compatible chat completion endpoint."
|
||||
},
|
||||
"OpenAIChatCompletion": {
|
||||
|
@ -7966,7 +7966,7 @@
|
|||
],
|
||||
"title": "OpenAICompletionWithInputMessages"
|
||||
},
|
||||
"OpenAICompletionRequest": {
|
||||
"OpenAICompletionRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
|
@ -8097,17 +8097,6 @@
|
|||
"type": "string",
|
||||
"description": "(Optional) The user to use."
|
||||
},
|
||||
"guided_choice": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "(Optional) vLLM-specific parameter for guided generation with a list of choices."
|
||||
},
|
||||
"prompt_logprobs": {
|
||||
"type": "integer",
|
||||
"description": "(Optional) vLLM-specific parameter for number of log probabilities to return for prompt tokens."
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The suffix that should be appended to the completion."
|
||||
|
@ -8118,7 +8107,7 @@
|
|||
"model",
|
||||
"prompt"
|
||||
],
|
||||
"title": "OpenAICompletionRequest",
|
||||
"title": "OpenAICompletionRequestWithExtraBody",
|
||||
"description": "Request parameters for OpenAI-compatible completion endpoint."
|
||||
},
|
||||
"OpenAICompletion": {
|
||||
|
|
24
docs/static/deprecated-llama-stack-spec.yaml
vendored
24
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
@ -1098,7 +1098,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionRequest'
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody'
|
||||
required: true
|
||||
deprecated: true
|
||||
/v1/openai/v1/chat/completions/{completion_id}:
|
||||
|
@ -1167,7 +1167,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OpenAICompletionRequest'
|
||||
$ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody'
|
||||
required: true
|
||||
deprecated: true
|
||||
/v1/openai/v1/embeddings:
|
||||
|
@ -5575,7 +5575,7 @@ components:
|
|||
title: OpenAIResponseFormatText
|
||||
description: >-
|
||||
Text response format for OpenAI-compatible chat completion requests.
|
||||
OpenAIChatCompletionRequest:
|
||||
OpenAIChatCompletionRequestWithExtraBody:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
|
@ -5717,7 +5717,7 @@ components:
|
|||
required:
|
||||
- model
|
||||
- messages
|
||||
title: OpenAIChatCompletionRequest
|
||||
title: OpenAIChatCompletionRequestWithExtraBody
|
||||
description: >-
|
||||
Request parameters for OpenAI-compatible chat completion endpoint.
|
||||
OpenAIChatCompletion:
|
||||
|
@ -5885,7 +5885,7 @@ components:
|
|||
- model
|
||||
- input_messages
|
||||
title: OpenAICompletionWithInputMessages
|
||||
OpenAICompletionRequest:
|
||||
OpenAICompletionRequestWithExtraBody:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
|
@ -5973,18 +5973,6 @@ components:
|
|||
user:
|
||||
type: string
|
||||
description: (Optional) The user to use.
|
||||
guided_choice:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) vLLM-specific parameter for guided generation with a list of
|
||||
choices.
|
||||
prompt_logprobs:
|
||||
type: integer
|
||||
description: >-
|
||||
(Optional) vLLM-specific parameter for number of log probabilities to
|
||||
return for prompt tokens.
|
||||
suffix:
|
||||
type: string
|
||||
description: >-
|
||||
|
@ -5993,7 +5981,7 @@ components:
|
|||
required:
|
||||
- model
|
||||
- prompt
|
||||
title: OpenAICompletionRequest
|
||||
title: OpenAICompletionRequestWithExtraBody
|
||||
description: >-
|
||||
Request parameters for OpenAI-compatible completion endpoint.
|
||||
OpenAICompletion:
|
||||
|
|
23
docs/static/llama-stack-spec.html
vendored
23
docs/static/llama-stack-spec.html
vendored
|
@ -153,7 +153,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionRequest"
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionRequestWithExtraBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -243,7 +243,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenAICompletionRequest"
|
||||
"$ref": "#/components/schemas/OpenAICompletionRequestWithExtraBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5018,7 +5018,7 @@
|
|||
"title": "OpenAIResponseFormatText",
|
||||
"description": "Text response format for OpenAI-compatible chat completion requests."
|
||||
},
|
||||
"OpenAIChatCompletionRequest": {
|
||||
"OpenAIChatCompletionRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
|
@ -5265,7 +5265,7 @@
|
|||
"model",
|
||||
"messages"
|
||||
],
|
||||
"title": "OpenAIChatCompletionRequest",
|
||||
"title": "OpenAIChatCompletionRequestWithExtraBody",
|
||||
"description": "Request parameters for OpenAI-compatible chat completion endpoint."
|
||||
},
|
||||
"OpenAIChatCompletion": {
|
||||
|
@ -5462,7 +5462,7 @@
|
|||
],
|
||||
"title": "OpenAICompletionWithInputMessages"
|
||||
},
|
||||
"OpenAICompletionRequest": {
|
||||
"OpenAICompletionRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
|
@ -5593,17 +5593,6 @@
|
|||
"type": "string",
|
||||
"description": "(Optional) The user to use."
|
||||
},
|
||||
"guided_choice": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "(Optional) vLLM-specific parameter for guided generation with a list of choices."
|
||||
},
|
||||
"prompt_logprobs": {
|
||||
"type": "integer",
|
||||
"description": "(Optional) vLLM-specific parameter for number of log probabilities to return for prompt tokens."
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The suffix that should be appended to the completion."
|
||||
|
@ -5614,7 +5603,7 @@
|
|||
"model",
|
||||
"prompt"
|
||||
],
|
||||
"title": "OpenAICompletionRequest",
|
||||
"title": "OpenAICompletionRequestWithExtraBody",
|
||||
"description": "Request parameters for OpenAI-compatible completion endpoint."
|
||||
},
|
||||
"OpenAICompletion": {
|
||||
|
|
24
docs/static/llama-stack-spec.yaml
vendored
24
docs/static/llama-stack-spec.yaml
vendored
|
@ -98,7 +98,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionRequest'
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody'
|
||||
required: true
|
||||
deprecated: false
|
||||
/v1/chat/completions/{completion_id}:
|
||||
|
@ -167,7 +167,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OpenAICompletionRequest'
|
||||
$ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody'
|
||||
required: true
|
||||
deprecated: false
|
||||
/v1/conversations:
|
||||
|
@ -3824,7 +3824,7 @@ components:
|
|||
title: OpenAIResponseFormatText
|
||||
description: >-
|
||||
Text response format for OpenAI-compatible chat completion requests.
|
||||
OpenAIChatCompletionRequest:
|
||||
OpenAIChatCompletionRequestWithExtraBody:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
|
@ -3966,7 +3966,7 @@ components:
|
|||
required:
|
||||
- model
|
||||
- messages
|
||||
title: OpenAIChatCompletionRequest
|
||||
title: OpenAIChatCompletionRequestWithExtraBody
|
||||
description: >-
|
||||
Request parameters for OpenAI-compatible chat completion endpoint.
|
||||
OpenAIChatCompletion:
|
||||
|
@ -4134,7 +4134,7 @@ components:
|
|||
- model
|
||||
- input_messages
|
||||
title: OpenAICompletionWithInputMessages
|
||||
OpenAICompletionRequest:
|
||||
OpenAICompletionRequestWithExtraBody:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
|
@ -4222,18 +4222,6 @@ components:
|
|||
user:
|
||||
type: string
|
||||
description: (Optional) The user to use.
|
||||
guided_choice:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) vLLM-specific parameter for guided generation with a list of
|
||||
choices.
|
||||
prompt_logprobs:
|
||||
type: integer
|
||||
description: >-
|
||||
(Optional) vLLM-specific parameter for number of log probabilities to
|
||||
return for prompt tokens.
|
||||
suffix:
|
||||
type: string
|
||||
description: >-
|
||||
|
@ -4242,7 +4230,7 @@ components:
|
|||
required:
|
||||
- model
|
||||
- prompt
|
||||
title: OpenAICompletionRequest
|
||||
title: OpenAICompletionRequestWithExtraBody
|
||||
description: >-
|
||||
Request parameters for OpenAI-compatible completion endpoint.
|
||||
OpenAICompletion:
|
||||
|
|
23
docs/static/stainless-llama-stack-spec.html
vendored
23
docs/static/stainless-llama-stack-spec.html
vendored
|
@ -153,7 +153,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionRequest"
|
||||
"$ref": "#/components/schemas/OpenAIChatCompletionRequestWithExtraBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -243,7 +243,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenAICompletionRequest"
|
||||
"$ref": "#/components/schemas/OpenAICompletionRequestWithExtraBody"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7027,7 +7027,7 @@
|
|||
"title": "OpenAIResponseFormatText",
|
||||
"description": "Text response format for OpenAI-compatible chat completion requests."
|
||||
},
|
||||
"OpenAIChatCompletionRequest": {
|
||||
"OpenAIChatCompletionRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
|
@ -7274,7 +7274,7 @@
|
|||
"model",
|
||||
"messages"
|
||||
],
|
||||
"title": "OpenAIChatCompletionRequest",
|
||||
"title": "OpenAIChatCompletionRequestWithExtraBody",
|
||||
"description": "Request parameters for OpenAI-compatible chat completion endpoint."
|
||||
},
|
||||
"OpenAIChatCompletion": {
|
||||
|
@ -7471,7 +7471,7 @@
|
|||
],
|
||||
"title": "OpenAICompletionWithInputMessages"
|
||||
},
|
||||
"OpenAICompletionRequest": {
|
||||
"OpenAICompletionRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
|
@ -7602,17 +7602,6 @@
|
|||
"type": "string",
|
||||
"description": "(Optional) The user to use."
|
||||
},
|
||||
"guided_choice": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "(Optional) vLLM-specific parameter for guided generation with a list of choices."
|
||||
},
|
||||
"prompt_logprobs": {
|
||||
"type": "integer",
|
||||
"description": "(Optional) vLLM-specific parameter for number of log probabilities to return for prompt tokens."
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The suffix that should be appended to the completion."
|
||||
|
@ -7623,7 +7612,7 @@
|
|||
"model",
|
||||
"prompt"
|
||||
],
|
||||
"title": "OpenAICompletionRequest",
|
||||
"title": "OpenAICompletionRequestWithExtraBody",
|
||||
"description": "Request parameters for OpenAI-compatible completion endpoint."
|
||||
},
|
||||
"OpenAICompletion": {
|
||||
|
|
24
docs/static/stainless-llama-stack-spec.yaml
vendored
24
docs/static/stainless-llama-stack-spec.yaml
vendored
|
@ -101,7 +101,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionRequest'
|
||||
$ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody'
|
||||
required: true
|
||||
deprecated: false
|
||||
/v1/chat/completions/{completion_id}:
|
||||
|
@ -170,7 +170,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OpenAICompletionRequest'
|
||||
$ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody'
|
||||
required: true
|
||||
deprecated: false
|
||||
/v1/conversations:
|
||||
|
@ -5269,7 +5269,7 @@ components:
|
|||
title: OpenAIResponseFormatText
|
||||
description: >-
|
||||
Text response format for OpenAI-compatible chat completion requests.
|
||||
OpenAIChatCompletionRequest:
|
||||
OpenAIChatCompletionRequestWithExtraBody:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
|
@ -5411,7 +5411,7 @@ components:
|
|||
required:
|
||||
- model
|
||||
- messages
|
||||
title: OpenAIChatCompletionRequest
|
||||
title: OpenAIChatCompletionRequestWithExtraBody
|
||||
description: >-
|
||||
Request parameters for OpenAI-compatible chat completion endpoint.
|
||||
OpenAIChatCompletion:
|
||||
|
@ -5579,7 +5579,7 @@ components:
|
|||
- model
|
||||
- input_messages
|
||||
title: OpenAICompletionWithInputMessages
|
||||
OpenAICompletionRequest:
|
||||
OpenAICompletionRequestWithExtraBody:
|
||||
type: object
|
||||
properties:
|
||||
model:
|
||||
|
@ -5667,18 +5667,6 @@ components:
|
|||
user:
|
||||
type: string
|
||||
description: (Optional) The user to use.
|
||||
guided_choice:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) vLLM-specific parameter for guided generation with a list of
|
||||
choices.
|
||||
prompt_logprobs:
|
||||
type: integer
|
||||
description: >-
|
||||
(Optional) vLLM-specific parameter for number of log probabilities to
|
||||
return for prompt tokens.
|
||||
suffix:
|
||||
type: string
|
||||
description: >-
|
||||
|
@ -5687,7 +5675,7 @@ components:
|
|||
required:
|
||||
- model
|
||||
- prompt
|
||||
title: OpenAICompletionRequest
|
||||
title: OpenAICompletionRequestWithExtraBody
|
||||
description: >-
|
||||
Request parameters for OpenAI-compatible completion endpoint.
|
||||
OpenAICompletion:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue