|
16 | 16 | from .._extras import numpy as np, has_numpy |
17 | 17 | from .._resource import SyncAPIResource, AsyncAPIResource |
18 | 18 | from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper |
19 | | -from .._base_client import ( |
20 | | - make_request_options, |
21 | | -) |
| 19 | +from .._base_client import make_request_options |
| 20 | +from ..types.embedding_model import EmbeddingModel |
22 | 21 | from ..types.create_embedding_response import CreateEmbeddingResponse |
23 | 22 |
|
24 | 23 | __all__ = ["Embeddings", "AsyncEmbeddings"] |
@@ -48,7 +47,7 @@ def create( |
48 | 47 | self, |
49 | 48 | *, |
50 | 49 | input: Union[str, List[str], Iterable[int], Iterable[Iterable[int]]], |
51 | | - model: Union[str, Literal["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"]], |
| 50 | + model: Union[str, EmbeddingModel], |
52 | 51 | dimensions: int | NotGiven = NOT_GIVEN, |
53 | 52 | encoding_format: Literal["float", "base64"] | NotGiven = NOT_GIVEN, |
54 | 53 | user: str | NotGiven = NOT_GIVEN, |
@@ -160,7 +159,7 @@ async def create( |
160 | 159 | self, |
161 | 160 | *, |
162 | 161 | input: Union[str, List[str], Iterable[int], Iterable[Iterable[int]]], |
163 | | - model: Union[str, Literal["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"]], |
| 162 | + model: Union[str, EmbeddingModel], |
164 | 163 | dimensions: int | NotGiven = NOT_GIVEN, |
165 | 164 | encoding_format: Literal["float", "base64"] | NotGiven = NOT_GIVEN, |
166 | 165 | user: str | NotGiven = NOT_GIVEN, |
|
0 commit comments