16 lines
322 B
Python
16 lines
322 B
Python
"""API response type definitions."""
|
|
|
|
from typing import TypedDict
|
|
|
|
|
|
class EmbeddingData(TypedDict):
|
|
"""Structure for embedding data from API response."""
|
|
|
|
embedding: list[float]
|
|
|
|
|
|
class EmbeddingResponse(TypedDict):
|
|
"""Structure for OpenAI-compatible embedding API response."""
|
|
|
|
data: list[EmbeddingData]
|