ray.serve.llm.openai_api_models.EmbeddingResponse#
- pydantic model ray.serve.llm.openai_api_models.EmbeddingResponse[source]#
EmbeddingResponse is the response body for the embedding API.
This model is compatible with vLLM’s OpenAI API models.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.
Show JSON schema
{ "title": "EmbeddingResponse", "description": "EmbeddingResponse is the response body for the embedding API.\n\nThis model is compatible with vLLM's OpenAI API models.\n\n**PublicAPI (alpha):** This API is in alpha and may change before becoming stable.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "object": { "default": "list", "title": "Object", "type": "string" }, "created": { "title": "Created", "type": "integer" }, "model": { "title": "Model", "type": "string" }, "data": { "items": { "$ref": "#/$defs/EmbeddingResponseData" }, "title": "Data", "type": "array" }, "usage": { "$ref": "#/$defs/UsageInfo" } }, "$defs": { "EmbeddingResponseData": { "properties": { "index": { "title": "Index", "type": "integer" }, "object": { "default": "embedding", "title": "Object", "type": "string" }, "embedding": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "string" } ], "title": "Embedding" } }, "required": [ "index", "embedding" ], "title": "EmbeddingResponseData", "type": "object" }, "PromptTokenUsageInfo": { "properties": { "cached_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Cached Tokens" } }, "title": "PromptTokenUsageInfo", "type": "object" }, "UsageInfo": { "properties": { "prompt_tokens": { "default": 0, "title": "Prompt Tokens", "type": "integer" }, "total_tokens": { "default": 0, "title": "Total Tokens", "type": "integer" }, "completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 0, "title": "Completion Tokens" }, "prompt_tokens_details": { "anyOf": [ { "$ref": "#/$defs/PromptTokenUsageInfo" }, { "type": "null" } ], "default": null } }, "title": "UsageInfo", "type": "object" } }, "required": [ "model", "data", "usage" ] }
- field data: List[EmbeddingResponseData] [Required]#
- field usage: UsageInfo [Required]#