llm-tools / embedJs

A NodeJS RAG framework to easily work with LLMs and embeddings
https://www.npmjs.com/package/@llm-tools/embedjs
Apache License 2.0
233 stars 32 forks source link

Support for VertexAI for Gemini LLM and Embedding #46

Closed tsibg closed 3 months ago

tsibg commented 3 months ago

I am interested in support for Gemini models, preferably on VertexAI by Google Cloud Platform. The Gemini 1.5 Pro supports up to 1M Context, which could open a bunch of possibilities for grounding and RAG. Further more it is multimodal (text, images, audio, PDFs, code, videos).

Resources for the integration:

LLM and Embedding models on VertexAI:

Langchain LLM support for VertexAI and all Gemini models:

Langchain Embeddings on VertexAI (Expirimental): Supports both textembedding-gecko and multimodalembedding@001

I'm currently working on the integration, it looks pretty straight forward. Will also submit a PR, if the authors are interested.

P.S. Thanks for creating this library, well structured and easy to use.

adhityan commented 3 months ago

Thank you @tsibg both for engaging and also for the PR. Let's get it merged in.

tsibg commented 3 months ago

Thanks for merging it.

Just a few ideas for future implementations:

Closing this issue as my use case is fully covered with the merge. Thanks again for the fast collab!

adhityan commented 3 months ago

Published new version 0.0.72 with merged changes.

I like the idea of natively supporting multimodal. RAG is still useful in a multimodal setup. I will start a discussion thread on the best way to go ahead with support for this in the library.