-
Notifications
You must be signed in to change notification settings - Fork 37
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
Also support embedding APIs? #171
Comments
I think that's currently out of scope for elmer, but we might end up implementing in a separate package. What do you need it for? |
I would love to see this as well! Embedding models are very helpful for part of RAG, allowing users to query text-based documents (say, a shiny app that only answers questions based on the embedding models can of course be used alone but are often implemented in concert with a chat (completions) model. |
For RAG applications, the approach elmer uses for tools might be best. I've tried to put RAG into a package ( |
Embeddings are very useful for RAG applications.
See https://ollama.com/blog/embedding-models I have also used this for openai:
I think it would make a lot of sense keep the same interface in elmer:
|
If you're interested, rollama already supports this (R package with a focus on Ollama): https://jbgruber.github.io/rollama/articles/text-embedding.html |
@JBGruber did you consider returning all the embeddings in a single matrix-column? I would suspect that might be faster to work with. |
One reason to do this in elmer is that 90% of HTTP request (e.g. error handling, rate-limiting, ...) will be the same. Implementing it in another package would require either extracting a lot of existing code or duplicating it (neither of which is particularly appealing given how young elmer is). The main reason I'm not sure about implementing in it elmer is that it would require a new API since jamming it into the chat object would be rather forced. The infrastructure is already there (i.e. this would become a new S7 method on the provider generic), but would require exporting a bunch more stuff that's currently internal (making it hard to change in the future). OTOH #202 and #167 already suggest that we need to export this stuff. |
Hi there, I hope you are doing well
Thank you for this package you are working on, it's great!
Do you have on mind the implementation for interacting with embedding models? Or maybe you have already implemented this but I didn't find it,
Greetings,
Abraham JA
The text was updated successfully, but these errors were encountered: