mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 01:48:05 +00:00
chore: re-add missing endpoints
Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
3d33291f23
commit
2cb0c31edd
6 changed files with 3871 additions and 2614 deletions
File diff suppressed because it is too large
Load diff
1290
docs/static/deprecated-llama-stack-spec.yaml
vendored
1290
docs/static/deprecated-llama-stack-spec.yaml
vendored
File diff suppressed because it is too large
Load diff
1282
docs/static/experimental-llama-stack-spec.yaml
vendored
1282
docs/static/experimental-llama-stack-spec.yaml
vendored
File diff suppressed because it is too large
Load diff
1863
docs/static/llama-stack-spec.yaml
vendored
1863
docs/static/llama-stack-spec.yaml
vendored
File diff suppressed because it is too large
Load diff
849
docs/static/stainless-llama-stack-spec.yaml
vendored
849
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -5674,6 +5674,37 @@ components:
|
|||
type: object
|
||||
title: ChatCompletionInputType
|
||||
description: Parameter type for chat completion input.
|
||||
Checkpoint:
|
||||
properties:
|
||||
identifier:
|
||||
type: string
|
||||
title: Identifier
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: Created At
|
||||
epoch:
|
||||
type: integer
|
||||
title: Epoch
|
||||
post_training_job_id:
|
||||
type: string
|
||||
title: Post Training Job Id
|
||||
path:
|
||||
type: string
|
||||
title: Path
|
||||
training_metrics:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/PostTrainingMetric'
|
||||
- type: 'null'
|
||||
type: object
|
||||
required:
|
||||
- identifier
|
||||
- created_at
|
||||
- epoch
|
||||
- post_training_job_id
|
||||
- path
|
||||
title: Checkpoint
|
||||
description: Checkpoint created during training runs.
|
||||
Chunk-Input:
|
||||
properties:
|
||||
content:
|
||||
|
|
@ -8372,6 +8403,155 @@ components:
|
|||
- status
|
||||
title: OpenAIResponseObject
|
||||
description: Complete OpenAI response object containing generation results and metadata.
|
||||
OpenAIResponseObjectWithInput-Output:
|
||||
properties:
|
||||
created_at:
|
||||
type: integer
|
||||
title: Created At
|
||||
error:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseError'
|
||||
- type: 'null'
|
||||
id:
|
||||
type: string
|
||||
title: Id
|
||||
model:
|
||||
type: string
|
||||
title: Model
|
||||
object:
|
||||
type: string
|
||||
const: response
|
||||
title: Object
|
||||
default: response
|
||||
output:
|
||||
items:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
|
||||
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
|
||||
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
|
||||
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
|
||||
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
|
||||
message: '#/components/schemas/OpenAIResponseMessage-Output'
|
||||
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
|
||||
type: array
|
||||
title: Output
|
||||
parallel_tool_calls:
|
||||
type: boolean
|
||||
title: Parallel Tool Calls
|
||||
default: false
|
||||
previous_response_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Previous Response Id
|
||||
prompt:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponsePrompt'
|
||||
- type: 'null'
|
||||
status:
|
||||
type: string
|
||||
title: Status
|
||||
temperature:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
title: Temperature
|
||||
text:
|
||||
$ref: '#/components/schemas/OpenAIResponseText'
|
||||
default:
|
||||
format:
|
||||
type: text
|
||||
top_p:
|
||||
anyOf:
|
||||
- type: number
|
||||
- type: 'null'
|
||||
title: Top P
|
||||
tools:
|
||||
anyOf:
|
||||
- items:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
|
||||
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
|
||||
function: '#/components/schemas/OpenAIResponseInputToolFunction'
|
||||
mcp: '#/components/schemas/OpenAIResponseToolMCP'
|
||||
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
web_search_2025_08_26: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
type: array
|
||||
- type: 'null'
|
||||
title: Tools
|
||||
truncation:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Truncation
|
||||
usage:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseUsage'
|
||||
- type: 'null'
|
||||
instructions:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Instructions
|
||||
max_tool_calls:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: 'null'
|
||||
title: Max Tool Calls
|
||||
input:
|
||||
items:
|
||||
anyOf:
|
||||
- oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
|
||||
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
|
||||
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
|
||||
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
|
||||
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
|
||||
message: '#/components/schemas/OpenAIResponseMessage-Output'
|
||||
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMessage-Output'
|
||||
type: array
|
||||
title: Input
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- id
|
||||
- model
|
||||
- output
|
||||
- status
|
||||
- input
|
||||
title: OpenAIResponseObjectWithInput
|
||||
description: OpenAI response object extended with input context information.
|
||||
OpenAIResponseOutputMessageContentOutputText:
|
||||
properties:
|
||||
text:
|
||||
|
|
@ -8937,6 +9117,28 @@ components:
|
|||
required:
|
||||
- reasoning_tokens
|
||||
title: OutputTokensDetails
|
||||
PaginatedResponse:
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
type: array
|
||||
title: Data
|
||||
has_more:
|
||||
type: boolean
|
||||
title: Has More
|
||||
url:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Url
|
||||
type: object
|
||||
required:
|
||||
- data
|
||||
- has_more
|
||||
title: PaginatedResponse
|
||||
description: A generic paginated response that follows a simple format.
|
||||
PostTrainingJob:
|
||||
properties:
|
||||
job_uuid:
|
||||
|
|
@ -8946,6 +9148,85 @@ components:
|
|||
required:
|
||||
- job_uuid
|
||||
title: PostTrainingJob
|
||||
PostTrainingJobArtifactsResponse:
|
||||
properties:
|
||||
job_uuid:
|
||||
type: string
|
||||
title: Job Uuid
|
||||
checkpoints:
|
||||
items:
|
||||
$ref: '#/components/schemas/Checkpoint'
|
||||
type: array
|
||||
title: Checkpoints
|
||||
type: object
|
||||
required:
|
||||
- job_uuid
|
||||
title: PostTrainingJobArtifactsResponse
|
||||
description: Artifacts of a finetuning job.
|
||||
PostTrainingJobStatusResponse:
|
||||
properties:
|
||||
job_uuid:
|
||||
type: string
|
||||
title: Job Uuid
|
||||
status:
|
||||
$ref: '#/components/schemas/JobStatus'
|
||||
scheduled_at:
|
||||
anyOf:
|
||||
- type: string
|
||||
format: date-time
|
||||
- type: 'null'
|
||||
title: Scheduled At
|
||||
started_at:
|
||||
anyOf:
|
||||
- type: string
|
||||
format: date-time
|
||||
- type: 'null'
|
||||
title: Started At
|
||||
completed_at:
|
||||
anyOf:
|
||||
- type: string
|
||||
format: date-time
|
||||
- type: 'null'
|
||||
title: Completed At
|
||||
resources_allocated:
|
||||
anyOf:
|
||||
- additionalProperties: true
|
||||
type: object
|
||||
- type: 'null'
|
||||
title: Resources Allocated
|
||||
checkpoints:
|
||||
items:
|
||||
$ref: '#/components/schemas/Checkpoint'
|
||||
type: array
|
||||
title: Checkpoints
|
||||
type: object
|
||||
required:
|
||||
- job_uuid
|
||||
- status
|
||||
title: PostTrainingJobStatusResponse
|
||||
description: Status of a finetuning job.
|
||||
PostTrainingMetric:
|
||||
properties:
|
||||
epoch:
|
||||
type: integer
|
||||
title: Epoch
|
||||
train_loss:
|
||||
type: number
|
||||
title: Train Loss
|
||||
validation_loss:
|
||||
type: number
|
||||
title: Validation Loss
|
||||
perplexity:
|
||||
type: number
|
||||
title: Perplexity
|
||||
type: object
|
||||
required:
|
||||
- epoch
|
||||
- train_loss
|
||||
- validation_loss
|
||||
- perplexity
|
||||
title: PostTrainingMetric
|
||||
description: Training metrics captured during post-training jobs.
|
||||
Prompt:
|
||||
properties:
|
||||
prompt:
|
||||
|
|
@ -9093,6 +9374,26 @@ components:
|
|||
- data
|
||||
title: RerankResponse
|
||||
description: Response from a reranking request.
|
||||
RouteInfo:
|
||||
properties:
|
||||
route:
|
||||
type: string
|
||||
title: Route
|
||||
method:
|
||||
type: string
|
||||
title: Method
|
||||
provider_types:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
title: Provider Types
|
||||
type: object
|
||||
required:
|
||||
- route
|
||||
- method
|
||||
- provider_types
|
||||
title: RouteInfo
|
||||
description: Information about an API route including its path, method, and implementing providers.
|
||||
RowsDataSource:
|
||||
properties:
|
||||
type:
|
||||
|
|
@ -9895,6 +10196,96 @@ components:
|
|||
- vector_store_id
|
||||
title: VectorStoreFileObject
|
||||
description: OpenAI Vector Store File object.
|
||||
VectorStoreFilesListInBatchResponse:
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
title: Object
|
||||
default: list
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreFileObject'
|
||||
type: array
|
||||
title: Data
|
||||
first_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: First Id
|
||||
last_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Last Id
|
||||
has_more:
|
||||
type: boolean
|
||||
title: Has More
|
||||
default: false
|
||||
type: object
|
||||
required:
|
||||
- data
|
||||
title: VectorStoreFilesListInBatchResponse
|
||||
description: Response from listing files in a vector store file batch.
|
||||
VectorStoreListFilesResponse:
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
title: Object
|
||||
default: list
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreFileObject'
|
||||
type: array
|
||||
title: Data
|
||||
first_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: First Id
|
||||
last_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Last Id
|
||||
has_more:
|
||||
type: boolean
|
||||
title: Has More
|
||||
default: false
|
||||
type: object
|
||||
required:
|
||||
- data
|
||||
title: VectorStoreListFilesResponse
|
||||
description: Response from listing files in a vector store.
|
||||
VectorStoreListResponse:
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
title: Object
|
||||
default: list
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreObject'
|
||||
type: array
|
||||
title: Data
|
||||
first_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: First Id
|
||||
last_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Last Id
|
||||
has_more:
|
||||
type: boolean
|
||||
title: Has More
|
||||
default: false
|
||||
type: object
|
||||
required:
|
||||
- data
|
||||
title: VectorStoreListResponse
|
||||
description: Response from listing vector stores.
|
||||
VectorStoreObject:
|
||||
properties:
|
||||
id:
|
||||
|
|
@ -18934,43 +19325,15 @@ components:
|
|||
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
||||
- $ref: '#/components/schemas/MetricEvent'
|
||||
- $ref: '#/components/schemas/StructuredLogEvent'
|
||||
ListOpenAIResponseInputItem:
|
||||
description: List container for OpenAI response input items.
|
||||
ResponseGuardrailSpec:
|
||||
description: Specification for a guardrail to apply during response generation.
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
anyOf:
|
||||
- discriminator:
|
||||
mapping:
|
||||
file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
|
||||
function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
|
||||
mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
|
||||
mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
|
||||
mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
|
||||
message: '#/components/schemas/OpenAIResponseMessage'
|
||||
web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
|
||||
propertyName: type
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseMessage'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall'
|
||||
- $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest'
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse'
|
||||
- $ref: '#/components/schemas/OpenAIResponseMessage'
|
||||
title: Data
|
||||
type: array
|
||||
object:
|
||||
const: list
|
||||
default: list
|
||||
title: Object
|
||||
type:
|
||||
title: Type
|
||||
type: string
|
||||
required:
|
||||
- data
|
||||
title: ListOpenAIResponseInputItem
|
||||
- type
|
||||
title: ResponseGuardrailSpec
|
||||
type: object
|
||||
OpenAIResponseObjectWithInput:
|
||||
description: OpenAI response object extended with input context information.
|
||||
|
|
@ -19125,82 +19488,6 @@ components:
|
|||
- input
|
||||
title: OpenAIResponseObjectWithInput
|
||||
type: object
|
||||
ListOpenAIResponseObject:
|
||||
description: Paginated list of OpenAI response objects with navigation metadata.
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/OpenAIResponseObjectWithInput'
|
||||
title: Data
|
||||
type: array
|
||||
has_more:
|
||||
title: Has More
|
||||
type: boolean
|
||||
first_id:
|
||||
title: First Id
|
||||
type: string
|
||||
last_id:
|
||||
title: Last Id
|
||||
type: string
|
||||
object:
|
||||
const: list
|
||||
default: list
|
||||
title: Object
|
||||
type: string
|
||||
required:
|
||||
- data
|
||||
- has_more
|
||||
- first_id
|
||||
- last_id
|
||||
title: ListOpenAIResponseObject
|
||||
type: object
|
||||
ResponseGuardrailSpec:
|
||||
description: Specification for a guardrail to apply during response generation.
|
||||
properties:
|
||||
type:
|
||||
title: Type
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
title: ResponseGuardrailSpec
|
||||
type: object
|
||||
ListBatchesResponse:
|
||||
description: Response containing a list of batch objects.
|
||||
properties:
|
||||
object:
|
||||
const: list
|
||||
default: list
|
||||
title: Object
|
||||
type: string
|
||||
data:
|
||||
description: List of batch objects
|
||||
items:
|
||||
$ref: '#/components/schemas/Batch'
|
||||
title: Data
|
||||
type: array
|
||||
first_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
description: ID of the first batch in the list
|
||||
title: First Id
|
||||
nullable: true
|
||||
last_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
description: ID of the last batch in the list
|
||||
title: Last Id
|
||||
nullable: true
|
||||
has_more:
|
||||
default: false
|
||||
description: Whether there are more batches available
|
||||
title: Has More
|
||||
type: boolean
|
||||
required:
|
||||
- data
|
||||
title: ListBatchesResponse
|
||||
type: object
|
||||
MetricInResponse:
|
||||
description: A metric value included in API responses.
|
||||
properties:
|
||||
|
|
@ -19223,83 +19510,6 @@ components:
|
|||
- value
|
||||
title: MetricInResponse
|
||||
type: object
|
||||
PaginatedResponse:
|
||||
description: A generic paginated response that follows a simple format.
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
title: Data
|
||||
type: array
|
||||
has_more:
|
||||
title: Has More
|
||||
type: boolean
|
||||
url:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: Url
|
||||
nullable: true
|
||||
required:
|
||||
- data
|
||||
- has_more
|
||||
title: PaginatedResponse
|
||||
type: object
|
||||
PostTrainingMetric:
|
||||
description: Training metrics captured during post-training jobs.
|
||||
properties:
|
||||
epoch:
|
||||
title: Epoch
|
||||
type: integer
|
||||
train_loss:
|
||||
title: Train Loss
|
||||
type: number
|
||||
validation_loss:
|
||||
title: Validation Loss
|
||||
type: number
|
||||
perplexity:
|
||||
title: Perplexity
|
||||
type: number
|
||||
required:
|
||||
- epoch
|
||||
- train_loss
|
||||
- validation_loss
|
||||
- perplexity
|
||||
title: PostTrainingMetric
|
||||
type: object
|
||||
Checkpoint:
|
||||
description: Checkpoint created during training runs.
|
||||
properties:
|
||||
identifier:
|
||||
title: Identifier
|
||||
type: string
|
||||
created_at:
|
||||
format: date-time
|
||||
title: Created At
|
||||
type: string
|
||||
epoch:
|
||||
title: Epoch
|
||||
type: integer
|
||||
post_training_job_id:
|
||||
title: Post Training Job Id
|
||||
type: string
|
||||
path:
|
||||
title: Path
|
||||
type: string
|
||||
training_metrics:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/PostTrainingMetric'
|
||||
- type: 'null'
|
||||
nullable: true
|
||||
required:
|
||||
- identifier
|
||||
- created_at
|
||||
- epoch
|
||||
- post_training_job_id
|
||||
- path
|
||||
title: Checkpoint
|
||||
type: object
|
||||
DialogType:
|
||||
description: Parameter type for dialog data with semantic output labels.
|
||||
properties:
|
||||
|
|
@ -19384,35 +19594,6 @@ components:
|
|||
- status
|
||||
title: ConversationMessage
|
||||
type: object
|
||||
ListOpenAIFileResponse:
|
||||
description: Response for listing files in OpenAI Files API.
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/OpenAIFileObject'
|
||||
title: Data
|
||||
type: array
|
||||
has_more:
|
||||
title: Has More
|
||||
type: boolean
|
||||
first_id:
|
||||
title: First Id
|
||||
type: string
|
||||
last_id:
|
||||
title: Last Id
|
||||
type: string
|
||||
object:
|
||||
const: list
|
||||
default: list
|
||||
title: Object
|
||||
type: string
|
||||
required:
|
||||
- data
|
||||
- has_more
|
||||
- first_id
|
||||
- last_id
|
||||
title: ListOpenAIFileResponse
|
||||
type: object
|
||||
Bf16QuantizationConfig:
|
||||
description: Configuration for BFloat16 precision (typically no quantization).
|
||||
properties:
|
||||
|
|
@ -19741,92 +19922,6 @@ components:
|
|||
title: Scheme
|
||||
title: Int4QuantizationConfig
|
||||
type: object
|
||||
OpenAIChoice:
|
||||
description: A choice from an OpenAI-compatible chat completion response.
|
||||
properties:
|
||||
message:
|
||||
discriminator:
|
||||
mapping:
|
||||
assistant: '#/components/schemas/OpenAIAssistantMessageParam'
|
||||
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
|
||||
system: '#/components/schemas/OpenAISystemMessageParam'
|
||||
tool: '#/components/schemas/OpenAIToolMessageParam'
|
||||
user: '#/components/schemas/OpenAIUserMessageParam'
|
||||
propertyName: role
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIUserMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAISystemMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAIAssistantMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAIToolMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
|
||||
title: Message
|
||||
finish_reason:
|
||||
title: Finish Reason
|
||||
type: string
|
||||
index:
|
||||
title: Index
|
||||
type: integer
|
||||
logprobs:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
|
||||
- type: 'null'
|
||||
nullable: true
|
||||
required:
|
||||
- message
|
||||
- finish_reason
|
||||
- index
|
||||
title: OpenAIChoice
|
||||
type: object
|
||||
OpenAIChoiceLogprobs:
|
||||
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
|
||||
properties:
|
||||
content:
|
||||
anyOf:
|
||||
- items:
|
||||
$ref: '#/components/schemas/OpenAITokenLogProb'
|
||||
type: array
|
||||
- type: 'null'
|
||||
title: Content
|
||||
nullable: true
|
||||
refusal:
|
||||
anyOf:
|
||||
- items:
|
||||
$ref: '#/components/schemas/OpenAITokenLogProb'
|
||||
type: array
|
||||
- type: 'null'
|
||||
title: Refusal
|
||||
nullable: true
|
||||
title: OpenAIChoiceLogprobs
|
||||
type: object
|
||||
ListOpenAIChatCompletionResponse:
|
||||
description: Response from listing OpenAI-compatible chat completions.
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/OpenAICompletionWithInputMessages'
|
||||
title: Data
|
||||
type: array
|
||||
has_more:
|
||||
title: Has More
|
||||
type: boolean
|
||||
first_id:
|
||||
title: First Id
|
||||
type: string
|
||||
last_id:
|
||||
title: Last Id
|
||||
type: string
|
||||
object:
|
||||
const: list
|
||||
default: list
|
||||
title: Object
|
||||
type: string
|
||||
required:
|
||||
- data
|
||||
- has_more
|
||||
- first_id
|
||||
- last_id
|
||||
title: ListOpenAIChatCompletionResponse
|
||||
type: object
|
||||
OpenAIChoiceDelta:
|
||||
description: A delta from an OpenAI-compatible chat completion streaming response.
|
||||
properties:
|
||||
|
|
@ -19864,6 +19959,27 @@ components:
|
|||
nullable: true
|
||||
title: OpenAIChoiceDelta
|
||||
type: object
|
||||
OpenAIChoiceLogprobs:
|
||||
description: The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
|
||||
properties:
|
||||
content:
|
||||
anyOf:
|
||||
- items:
|
||||
$ref: '#/components/schemas/OpenAITokenLogProb'
|
||||
type: array
|
||||
- type: 'null'
|
||||
title: Content
|
||||
nullable: true
|
||||
refusal:
|
||||
anyOf:
|
||||
- items:
|
||||
$ref: '#/components/schemas/OpenAITokenLogProb'
|
||||
type: array
|
||||
- type: 'null'
|
||||
title: Refusal
|
||||
nullable: true
|
||||
title: OpenAIChoiceLogprobs
|
||||
type: object
|
||||
OpenAIChunkChoice:
|
||||
description: A chunk choice from an OpenAI-compatible chat completion streaming response.
|
||||
properties:
|
||||
|
|
@ -19920,6 +20036,42 @@ components:
|
|||
- model
|
||||
title: OpenAIChatCompletionChunk
|
||||
type: object
|
||||
OpenAIChoice:
|
||||
description: A choice from an OpenAI-compatible chat completion response.
|
||||
properties:
|
||||
message:
|
||||
discriminator:
|
||||
mapping:
|
||||
assistant: '#/components/schemas/OpenAIAssistantMessageParam'
|
||||
developer: '#/components/schemas/OpenAIDeveloperMessageParam'
|
||||
system: '#/components/schemas/OpenAISystemMessageParam'
|
||||
tool: '#/components/schemas/OpenAIToolMessageParam'
|
||||
user: '#/components/schemas/OpenAIUserMessageParam'
|
||||
propertyName: role
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIUserMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAISystemMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAIAssistantMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAIToolMessageParam'
|
||||
- $ref: '#/components/schemas/OpenAIDeveloperMessageParam'
|
||||
title: Message
|
||||
finish_reason:
|
||||
title: Finish Reason
|
||||
type: string
|
||||
index:
|
||||
title: Index
|
||||
type: integer
|
||||
logprobs:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/OpenAIChoiceLogprobs'
|
||||
- type: 'null'
|
||||
nullable: true
|
||||
required:
|
||||
- message
|
||||
- finish_reason
|
||||
- index
|
||||
title: OpenAIChoice
|
||||
type: object
|
||||
OpenAICompletionChoice:
|
||||
description: |-
|
||||
A choice from an OpenAI-compatible completion response.
|
||||
|
|
@ -20040,53 +20192,6 @@ components:
|
|||
- content
|
||||
title: ToolResponse
|
||||
type: object
|
||||
RouteInfo:
|
||||
description: Information about an API route including its path, method, and implementing providers.
|
||||
properties:
|
||||
route:
|
||||
title: Route
|
||||
type: string
|
||||
method:
|
||||
title: Method
|
||||
type: string
|
||||
provider_types:
|
||||
items:
|
||||
type: string
|
||||
title: Provider Types
|
||||
type: array
|
||||
required:
|
||||
- route
|
||||
- method
|
||||
- provider_types
|
||||
title: RouteInfo
|
||||
type: object
|
||||
ListRoutesResponse:
|
||||
description: Response containing a list of all available API routes.
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/components/schemas/RouteInfo'
|
||||
title: Data
|
||||
type: array
|
||||
required:
|
||||
- data
|
||||
title: ListRoutesResponse
|
||||
type: object
|
||||
PostTrainingJobArtifactsResponse:
|
||||
description: Artifacts of a finetuning job.
|
||||
properties:
|
||||
job_uuid:
|
||||
title: Job Uuid
|
||||
type: string
|
||||
checkpoints:
|
||||
items:
|
||||
$ref: '#/components/schemas/Checkpoint'
|
||||
title: Checkpoints
|
||||
type: array
|
||||
required:
|
||||
- job_uuid
|
||||
title: PostTrainingJobArtifactsResponse
|
||||
type: object
|
||||
PostTrainingJobLogStream:
|
||||
description: Stream of logs from a finetuning job.
|
||||
properties:
|
||||
|
|
@ -20103,52 +20208,6 @@ components:
|
|||
- log_lines
|
||||
title: PostTrainingJobLogStream
|
||||
type: object
|
||||
PostTrainingJobStatusResponse:
|
||||
description: Status of a finetuning job.
|
||||
properties:
|
||||
job_uuid:
|
||||
title: Job Uuid
|
||||
type: string
|
||||
status:
|
||||
$ref: '#/components/schemas/JobStatus'
|
||||
scheduled_at:
|
||||
anyOf:
|
||||
- format: date-time
|
||||
type: string
|
||||
- type: 'null'
|
||||
title: Scheduled At
|
||||
nullable: true
|
||||
started_at:
|
||||
anyOf:
|
||||
- format: date-time
|
||||
type: string
|
||||
- type: 'null'
|
||||
title: Started At
|
||||
nullable: true
|
||||
completed_at:
|
||||
anyOf:
|
||||
- format: date-time
|
||||
type: string
|
||||
- type: 'null'
|
||||
title: Completed At
|
||||
nullable: true
|
||||
resources_allocated:
|
||||
anyOf:
|
||||
- additionalProperties: true
|
||||
type: object
|
||||
- type: 'null'
|
||||
title: Resources Allocated
|
||||
nullable: true
|
||||
checkpoints:
|
||||
items:
|
||||
$ref: '#/components/schemas/Checkpoint'
|
||||
title: Checkpoints
|
||||
type: array
|
||||
required:
|
||||
- job_uuid
|
||||
- status
|
||||
title: PostTrainingJobStatusResponse
|
||||
type: object
|
||||
RLHFAlgorithm:
|
||||
description: Available reinforcement learning from human feedback algorithms.
|
||||
enum:
|
||||
|
|
|
|||
|
|
@ -334,6 +334,31 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api):
|
|||
params_only_endpoint.__annotations__ = param_annotations
|
||||
endpoint_func = params_only_endpoint
|
||||
else:
|
||||
# Endpoint with no parameters and no response model
|
||||
# If we have a response_model from the function signature, use it even if _find_models_for_endpoint didn't find it
|
||||
# This can happen if there was an exception during model finding
|
||||
if response_model is None:
|
||||
# Try to get response model directly from the function signature as a fallback
|
||||
func = _get_protocol_method(api, name)
|
||||
if func:
|
||||
try:
|
||||
sig = inspect.signature(func)
|
||||
return_annotation = sig.return_annotation
|
||||
if return_annotation != inspect.Signature.empty:
|
||||
if hasattr(return_annotation, "model_json_schema"):
|
||||
response_model = return_annotation
|
||||
elif get_origin(return_annotation) is Annotated:
|
||||
args = get_args(return_annotation)
|
||||
if args and hasattr(args[0], "model_json_schema"):
|
||||
response_model = args[0]
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if response_model:
|
||||
|
||||
async def no_params_endpoint() -> response_model:
|
||||
return response_model() if response_model else {}
|
||||
else:
|
||||
|
||||
async def no_params_endpoint():
|
||||
return {}
|
||||
|
|
@ -386,6 +411,11 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod, api: Api):
|
|||
},
|
||||
}
|
||||
|
||||
# FastAPI needs response_model parameter to properly generate OpenAPI spec
|
||||
# Use the non-streaming response model if available
|
||||
if response_model:
|
||||
route_kwargs["response_model"] = response_model
|
||||
|
||||
method_map = {"GET": app.get, "POST": app.post, "PUT": app.put, "DELETE": app.delete, "PATCH": app.patch}
|
||||
for method in methods:
|
||||
if handler := method_map.get(method.upper()):
|
||||
|
|
@ -1434,10 +1464,30 @@ def _filter_schema_by_version(
|
|||
|
||||
filtered_paths = {}
|
||||
for path, path_item in filtered_schema["paths"].items():
|
||||
if exclude_deprecated and _is_path_deprecated(path_item):
|
||||
if not isinstance(path_item, dict):
|
||||
continue
|
||||
|
||||
# Filter at operation level, not path level
|
||||
# This allows paths with both deprecated and non-deprecated operations
|
||||
filtered_path_item = {}
|
||||
for method in ["get", "post", "put", "delete", "patch", "head", "options"]:
|
||||
if method not in path_item:
|
||||
continue
|
||||
operation = path_item[method]
|
||||
if not isinstance(operation, dict):
|
||||
continue
|
||||
|
||||
# Skip deprecated operations if exclude_deprecated is True
|
||||
if exclude_deprecated and operation.get("deprecated", False):
|
||||
continue
|
||||
|
||||
filtered_path_item[method] = operation
|
||||
|
||||
# Only include path if it has at least one operation after filtering
|
||||
if filtered_path_item:
|
||||
# Check if path matches version filter
|
||||
if (stable_only and _is_stable_path(path)) or (not stable_only and _is_experimental_path(path)):
|
||||
filtered_paths[path] = path_item
|
||||
filtered_paths[path] = filtered_path_item
|
||||
|
||||
filtered_schema["paths"] = filtered_paths
|
||||
return _filter_schemas_by_references(filtered_schema, filtered_paths, openapi_schema)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue