-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cohere embedding function #550
Conversation
@@ -12,6 +12,7 @@ | |||
# limitations under the License. | |||
|
|||
|
|||
from .cohere import CohereEmbeddingFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it worth separating out the existing embedding functions into their own modules? e.g., openai.py
, openclip.py
, sentence_transformers.py
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think so. The scope and size of the file functions.py will become too large otherwise.
python/lancedb/embeddings/cohere.py
Outdated
|
||
def ndims(self): | ||
if self._ndims is None: | ||
self._ndims = len(self.generate_embeddings(["foo"])[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this requires a remote api call which is a bit unfortunate. Can we just hard code it for now like we do with openai?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. But what does this accomplish tho? If a user uses a different model, won't hardcoding error out?
build all features Co-authored-by: Chang She <759245+changhiskhan@users.noreply.github.com>
No description provided.