mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-27 23:12:58 +00:00
feat(python): add model_names() method to openai embedding function (#1049)
small QoL improvement
This commit is contained in:
@@ -36,6 +36,14 @@ class OpenAIEmbeddings(TextEmbeddingFunction):
|
||||
def ndims(self):
|
||||
return self._ndims
|
||||
|
||||
@staticmethod
|
||||
def model_names():
|
||||
return [
|
||||
"text-embedding-ada-002",
|
||||
"text-embedding-3-large",
|
||||
"text-embedding-3-small",
|
||||
]
|
||||
|
||||
@cached_property
|
||||
def _ndims(self):
|
||||
if self.name == "text-embedding-ada-002":
|
||||
|
||||
Reference in New Issue
Block a user