|
18 | 18 | from .._resource import SyncAPIResource, AsyncAPIResource |
19 | 19 | from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper |
20 | 20 | from .._base_client import make_request_options |
| 21 | +from ..types.embedding_model import EmbeddingModel |
21 | 22 | from ..types.create_embedding_response import CreateEmbeddingResponse |
22 | 23 |
|
23 | 24 | __all__ = ["Embeddings", "AsyncEmbeddings"] |
@@ -47,7 +48,7 @@ def create( |
47 | 48 | self, |
48 | 49 | *, |
49 | 50 | input: Union[str, List[str], Iterable[int], Iterable[Iterable[int]]], |
50 | | - model: Union[str, Literal["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"]], |
| 51 | + model: Union[str, EmbeddingModel], |
51 | 52 | dimensions: int | NotGiven = NOT_GIVEN, |
52 | 53 | encoding_format: Literal["float", "base64"] | NotGiven = NOT_GIVEN, |
53 | 54 | user: str | NotGiven = NOT_GIVEN, |
@@ -137,7 +138,7 @@ async def create( |
137 | 138 | self, |
138 | 139 | *, |
139 | 140 | input: Union[str, List[str], Iterable[int], Iterable[Iterable[int]]], |
140 | | - model: Union[str, Literal["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"]], |
| 141 | + model: Union[str, EmbeddingModel], |
141 | 142 | dimensions: int | NotGiven = NOT_GIVEN, |
142 | 143 | encoding_format: Literal["float", "base64"] | NotGiven = NOT_GIVEN, |
143 | 144 | user: str | NotGiven = NOT_GIVEN, |
|
0 commit comments