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

exposed AzureOpenAI provider #698

Merged
merged 7 commits into from
Dec 20, 2023
Merged

Conversation

epinzur
Copy link
Contributor

@epinzur epinzur commented Dec 19, 2023

Exposed the AzureOpenAI provider so I can use it to power feedback functions.

@epinzur
Copy link
Contributor Author

epinzur commented Dec 19, 2023

I guess I should create docs for this too. I'll work on that.

@joshreini1
Copy link
Contributor

Thanks @epinzur !

@@ -366,26 +366,25 @@ class AzureOpenAI(OpenAI):
Has the same functionality as OpenAI out of the box feedback functions.
"""

def __init__(self, endpoint=None, deployment_name="gpt-35-turbo", **kwargs):
def __init__(self, deployment_name: str, endpoint=None, **kwargs):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dropped the default here since model deployment names in Azure can be anything. I can deploy gpt-3.5-turbo as open-ai.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a typical default that we can still use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. There are no models deployed by default. You need to pick and choose which to deploy and choose the name at deployment time. The deployment name often doesn't match the model name due to Azure naming restrictions.

@epinzur
Copy link
Contributor Author

epinzur commented Dec 19, 2023

I've tested this locally by copying the AzureOpenAI class into my notebook.

@joshreini1 joshreini1 merged commit 159c0be into truera:main Dec 20, 2023
5 checks passed
@epinzur epinzur deleted the esp/expose_azure branch December 20, 2023 18:21
sfc-gh-dhuang pushed a commit that referenced this pull request Jun 28, 2024
* exposed AzureOpenAI provider

* added docs

* Update CONTRIBUTING.md

* typo in mkdocs.yml

---------

Co-authored-by: Josh Reini <[email protected]>
sfc-gh-chu pushed a commit that referenced this pull request Sep 25, 2024
* exposed AzureOpenAI provider

* added docs

* Update CONTRIBUTING.md

* typo in mkdocs.yml

---------

Co-authored-by: Josh Reini <[email protected]>
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.

3 participants