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

[Bug] Missing support for AzureAI #770

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

riedgar-ms
Copy link
Collaborator

@riedgar-ms riedgar-ms commented Apr 22, 2024

AzureAI changed how their playground shows how to call their OpenAI models. Make sure that we support this. Extra tests have been added, extra documentation to the AzureOpenAI class itself, and also updates to the notebook tests.

from typing import Type
from urllib.parse import parse_qs, urlparse

import tiktoken
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we're getting rid of a hard openai dependency, we may have to do an optional import check here too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tiktoken is still a hard dependency.... should that change?

Comment on lines +56 to +57
model : str
The name of the OpenAI model to use (e.g. gpt-3.5-turbo).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we assuming users will use the openAI naming scheme when supplying this info, even if their deployment is named something different?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They have to. This is supposed to be the name in the drop down when they deploy the model:
image

@Harsha-Nori
Copy link
Collaborator

I think updating the notebooks (and possibly adding a README example?) here would be good too

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 27.27273% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 62.47%. Comparing base (8cf29c2) to head (079182c).

Files Patch % Lines
guidance/models/_azure_openai.py 27.27% 8 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #770      +/-   ##
==========================================
- Coverage   68.97%   62.47%   -6.50%     
==========================================
  Files          55       55              
  Lines        4058     4067       +9     
==========================================
- Hits         2799     2541     -258     
- Misses       1259     1526     +267     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@riedgar-ms
Copy link
Collaborator Author

Updated notebooks, and the documentation on the AzureOpenAI class itself.

@riedgar-ms
Copy link
Collaborator Author

Will merge in the morning, unless there are further objections.

@riedgar-ms riedgar-ms merged commit d021acc into guidance-ai:main Apr 23, 2024
96 checks passed
@riedgar-ms riedgar-ms deleted the riedgar-ms/azure-ai-fixes-01 branch April 23, 2024 11:30
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