azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

[BUG] other AI provider doesn't work with NonAzureOpenAI

Open junan-trustarc opened this issue 1 year ago • 1 comments

Describe the bug I am trying to use multiple AI providers using this SDK since payload is same,

  1. Azure OpenAI
  2. Open AI
  3. Perplexity AI

However, there is hard coded value OPEN_AI_ENDPOINT for nonAzureOpenAi and can't modify, so that only Azure OpenAI and OpenAi are working and doesn't work with other AI provider such as Perplexity AI even though payload of request, response is same.

To Reproduce Steps to reproduce the behavior: set endpoint = "https://api.perplexity.ai/"

Code Snippet image image image

Expected behavior Need to able to modify OPEN_AI_ENDPOINT (maybe rename to generic like nonAzureAiEndpoint) while creating OpenAIAsyncClient using OpenAIClientBuilder so that this will support for all other AI providers.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [v] Bug Description Added
  • [v] Repro Steps Added
  • [v] Setup information Added

junan-trustarc avatar May 16 '24 04:05 junan-trustarc

Hi @junan-trustarc

Unfortunately, we will not support non-OpenAI models in this SDK, azure-ai-openai as per our partnership with OpenAI. The most major models are available as first-class Azure Host Endpoints, such as Llama2, Cohere and Mistra, via Azure MaaS (Azure AI Studio Model Catalog). They can also host most Hugging Face models or your own models in the future via Azure MaaP(AML) in the future. We will provide an ("OpenAI like") Model Inference API spec for completions to MaaS in the near future.

Worth to mention here that this SDK supports proxy feature in case someone not aware of it.

mssfang avatar May 16 '24 17:05 mssfang