NVIDIA / NeMo-Guardrails

NeMo Guardrails is an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems.
Other
3.99k stars 366 forks source link

[Feature Request] Bedrock Embedding model #139

Open austinmw opened 11 months ago

austinmw commented 11 months ago

Hi, Bedrock has a couple of embedding models, in particular, "amazon.titan-embed-g1-text-02". I'd like to submit a feature request so that I can use this model:

models:
  - type: embeddings
    engine: amazon_bedrock
    parameters:
      model_id: "amazon.titan-embed-text-v1"

I think this file needs to be updated? https://github.com/NVIDIA/NeMo-Guardrails/blob/5f2541edb3e1115d48fc219e6e4d287d2d759ca1/nemoguardrails/embeddings/basic.py

drazvan commented 11 months ago

Check out this commit which added support for OpenAI embeddings from @jamescalam. If you have bandwidth to submit a PR, that would be great.

d-mariano commented 6 months ago

Hey all! I can take this on if it is still required by folks. If this is still not a requirement or requirements have changed I am happy to take on something else!

drazvan commented 6 months ago

Hi @d-mariano! We've recently refactored how the OpenAI embeddings are integrated. Integrating this one should be similar. https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/embeddings/embedding_providers/openai.py

Thanks!

d-mariano commented 6 months ago

Amazing @drazvan. I'll give this a go sometime this week or next if that's cool.