-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we use the azure gpt key? #7
Comments
Hi @YongLD, yes, you can, see the documentation for OpenAI here. It supports taking in parameters like "base_url" which can be used to connect to the Azure OpenAI service: https://datadreamer.dev/docs/latest/datadreamer.llms.html#datadreamer.llms.OpenAI So you can set |
Hi @AjayP13 , can you provide a sample code?, I am trying to use Azure OAI and have provided my resource name in the
|
Hi @seanbenhur, I actually don't use Azure OpenAI, so I've never tested this directly since I don't have a Azure OpenAI key, but you can see on this line: DataDreamer/src/llms/openai.py Line 196 in ad3dd9c
how we pass If you don't mind debugging this for me and seeing if you can get it to work or seeing if there's a bug I can fix it. And if you get it to work, it would be great if you could report back on what was the issue and a code snippet for others. If you want to reach me you can email me at ajayp@seas.upenn.edu and I can help assist you as well trying to figure this out further if you can't get it to work / we could debug over a video call if needed. |
Sure, I will work on it |
@AjayP13 The problem seems to be that in the code Azure OpenAI uses azure_ad_token if you're using Azure Active Directory (AAD) tokens. If you're using API keys, you should continue using api_key, not azure_ad_token. |
Hi @jonasherfort, thanks for identifying the issue. I will work on fixing this soon, in the mean time you can override the OpenAI class to fix the issue to unblock yourself if you are comfortable doing overrides. |
As the title said, How can I use the azure gpt key in DataDreamer?
The text was updated successfully, but these errors were encountered: