NVIDIA / NeMo-Guardrails

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

Support for Azure OpenAi embedding model #692

Open shubhiroy opened 3 weeks ago

shubhiroy commented 3 weeks ago

I'd like to propose adding support for the Azure OpenAI embedding model. My primary reason for this is to enable the use of the text-embedding-ada-002 model as the embedding model.

I believe this could be beneficial for those who are already using Azure's services or prefer to work within that ecosystem. I'm also happy to contribute to implementing this feature. Would there be any preference on how to integrate Azure OpenAI support? We could potentially add it in the configuration file, similar to other models.

  models:
    - type: main
      engine: openai
      model: text-davinci-003
   - type: embedding
     engine: azure
     model: text-embedding-ada-002
drazvan commented 3 weeks ago

Hi @shubhiroy! Thanks for offering to contribute to this. Should be very straightforward to add, very similar to https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/embeddings/providers/openai.py. And all the relevant code is in here: https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/nemoguardrails/embeddings/providers.

Let me know if you need more guidance. Looking forward to your PR!

shubhiroy commented 2 weeks ago

Hi @drazvan, Can you please review this pr? - #702