diff --git a/src/openai/types/embedding.py b/src/openai/types/embedding.py index 769b1d165f..50ba98d542 100644 --- a/src/openai/types/embedding.py +++ b/src/openai/types/embedding.py @@ -1,6 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List +from typing import Union + from typing_extensions import Literal from .._models import BaseModel @@ -9,10 +11,12 @@ class Embedding(BaseModel): - embedding: List[float] - """The embedding vector, which is a list of floats. + embedding: Union[List[float], str] + """The embedding vector, which can be either: + - a list of floats (if encoding_format is "float") + - a base64 encoded string (if encoding_format is "base64"). - The length of vector depends on the model as listed in the + The length of the vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). """