Skip to content
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

Implement Azure OpenAI Service #40

Merged
merged 3 commits into from Feb 16, 2023
Merged

Implement Azure OpenAI Service #40

merged 3 commits into from Feb 16, 2023

Conversation

ncface
Copy link

@ncface ncface commented Feb 14, 2023

Implements configurations to work with Azures OpenAI service.

@OkGoDoIt
Copy link
Owner

I applied for access to the Azure OpenAI service but was denied, so I have no way to validate or test this. But I would love to support it. Do you have access yourself?

@ncface
Copy link
Author

ncface commented Feb 14, 2023

Yes, I have access to the service in a subscription through a project of my company. The main difference to the direct OpenAI-API is, that the api-version in the URI is mandatory and the api-key header is used.
It would be great if I can use this project for consuming the Azure OpenAI Service in a project.

@gotmike
Copy link
Contributor

gotmike commented Feb 14, 2023

does this change take the place of the original endpoint?

@gotmike
Copy link
Contributor

gotmike commented Feb 14, 2023

I applied for access to the Azure OpenAI service but was denied, so I have no way to validate or test this. But I would love to support it. Do you have access yourself?

currently only supports "managed" accounts --> https://learn.microsoft.com/en-us/legal/cognitive-services/openai/limited-access?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext

Azure OpenAI requires registration and is currently only available to managed customers and partners working with Microsoft account teams.

@ncface
Copy link
Author

ncface commented Feb 14, 2023

does this change take the place of the original endpoint?

No, the OpenAI-API-URL is still set as default. My intention was to additionally support the Azure Service.
If you take a closer look into the code changes, there is only added a separate header with the same API-Key like for the OpenAI API itself (so now are both headers sent always) and the version as parameter to the Endpoint-URL (if not set, as per default, nothing is added to the end of the endpoint-URL).

@ncface
Copy link
Author

ncface commented Feb 14, 2023

I applied for access to the Azure OpenAI service but was denied, so I have no way to validate or test this. But I would love to support it. Do you have access yourself?

currently only supports "managed" accounts --> https://learn.microsoft.com/en-us/legal/cognitive-services/openai/limited-access?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext

Azure OpenAI requires registration and is currently only available to managed customers and partners working with Microsoft account teams.

Yeah, even our Microsoft customer success manager didn't had access to the API. So it seems like they keep access to it as a shortage...

@OkGoDoIt
Copy link
Owner

Thanks for your help with this. Since I can't test it myself, can you please add some integration tests that use the Azure endpoint? I'll still need to disable them on my end until I can get access, but it would be good to have tests implemented and run on your end.

Copy link
Owner

@OkGoDoIt OkGoDoIt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good first pass. I'll merge it and then add a new commit myself to smooth a couple issues.

@OkGoDoIt OkGoDoIt merged commit bc9043a into OkGoDoIt:master Feb 16, 2023
@ncface
Copy link
Author

ncface commented Feb 16, 2023

Thank you @OkGoDoIt , Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants