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

Support Azure OpenAI. #142

Open
zmhu opened this issue Dec 12, 2023 · 6 comments
Open

Support Azure OpenAI. #142

zmhu opened this issue Dec 12, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@zmhu
Copy link
Contributor

zmhu commented Dec 12, 2023

I have a suggestion, can Azure OpenAI's API also be supported? If there is no time for development, I can also take care of it.

@anasfik
Copy link
Owner

anasfik commented Dec 13, 2023

Please do, it was previously requested so I started an azure branch but I couldn't test it personally since I can't have an Azure OpenAI access.

it is really highly appreciated, during your support for it I can help as well.

@zmhu
Copy link
Contributor Author

zmhu commented Dec 15, 2023

I modified the code and tailored it for ChatGPT, then I made updates to the README file. You can find the code in this branch (https://github.com/geeker-ai/dart_openai/tree/azure). Your review is much appreciated. This is the most basic adaptation I could conceive of. If you find this approach feasible, I can customize it for other models compatible with Azure.

@MrHazee
Copy link

MrHazee commented Dec 16, 2023

@zmhu I've tested your modified code and I encountered an issue:
"The method 'configureRestAPI' isn't defined for the type 'AzureOpenAi'."
Could there be something I overlooked?

 // Set your API key
  AzureOpenAI.apiKey = Env.apiKey;

  // Set your resource name and deployment name
  AzureOpenAI.configureRestAPI(
    yourResourceName: "your_resource_name",
    yourDeploymentName: "your_deployment_name",
    apiVersion: DateTime(2023, 06, 01),
  );

Same behavior with the example.
Thanks

@anasfik anasfik added the enhancement New feature or request label Feb 21, 2024
@BartoszRudnik
Copy link

Hi there, could you please provide an update on the current status of this feature? Thank you!

@tyler-jewell
Copy link

@zmhu @anasfik I will take on this issue as I have a paid account and can do the full testing. I will further update this branch.

@tyler-jewell
Copy link

@zmhu @anasfik do we want to try to place everything into the OpenAI singleton instead of creating a new "AzureOpenAI" class?

It's all OpenAI at the end of the day.

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

No branches or pull requests

5 participants