MemGPT/memgpt/models/embedding_response.py
2024-08-16 19:52:47 -07:00

12 lines
357 B
Python

from typing import List, Literal
from pydantic import BaseModel
class EmbeddingResponse(BaseModel):
"""OpenAI embedding response model: https://platform.openai.com/docs/api-reference/embeddings/object"""
index: int # the index of the embedding in the list of embeddings
embedding: List[float]
object: Literal["embedding"] = "embedding"