AzureOpenAI features not supported and are hard coded
🐛 Describe the bug
In the documentation and the code base there seems to be a discrepancy. In the documentation, it says to use the following environment variables while using AzureOpenAI services, but the name of the environment variables differs. Secondly, I was looking at the source code and it seems that the api version was hard coded. It would be nice to pull the from yaml config. Thirdly, I couldn't see the embedder for AzureOpenAI in the source code. Thank you!
Facing same issue
I was able to load the version from the YAML config, in the latest version, below an example how it worked.
os.environ["OPENAI_API_VERSION"] = "2024-02-01"
I will take this up
@neilbhutada
My PR will fix the mismatch in the documentation for azure openai environment variables, and let you add api_version from the config.
Azure OpenAI embedder is already present in the code and docs. You can put your deployment name in config and use it.
However, I feel it should be in a different file such as embedders/azure_openai.py, and self.config.deployment_name should not be used to differentiate between azure and openai embedded. @Dev-Khant let me know if you think the same, will make that change.
Please let me know if you have any other issues.
@PranavPuranik Thanks for working on this. Yes, I agree that we should put azure_openai embedder in a different.
Thanks for opening a PR, I'll review it.