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

Add Support for Azure AI #352

Closed
wants to merge 4 commits into from
Closed

Add Support for Azure AI #352

wants to merge 4 commits into from

Conversation

Phiph
Copy link
Contributor

@Phiph Phiph commented Oct 21, 2024

Hey there,

I love the plugin, and I wanted to use it in my project. I have an Azure OpenAI deployment that I need to reference.

I've had to update the code to use Chat, but I;m not too sure if that breaks the openAI flow - I don't have a key to test it.

I'd welcome any feedback, suggestions or collaboration in testing the other flows.

openAIApiKey: options.apiKey,
modelName: options.modelName,
temperature: options.temperature,
configuration: { organization: options.organization },
});
break;
case "azureai":
this.model = new AzureChatOpenAI({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The settings are not set here, as you can use the EnvVars and the package will pick those up by default.

e.g:

OPENAI_API_KEY=
AZURE_OPENAI_API_INSTANCE_NAME="oai-4turbo"
AZURE_OPENAI_API_DEPLOYMENT_NAME="gpt-4-turbo"
AZURE_OPENAI_API_KEY=xxxx
AZURE_OPENAI_API_VERSION="2024-08-01-preview"

@mattzcarey
Copy link
Owner

Hey, if you update your pr and add some usage docs I will approve and get this merged.

Please make a new file ai-provider-config.md to document how to use Azure AI. I cannot test this as I do not use this provider :)

@Phiph
Copy link
Contributor Author

Phiph commented Jan 17, 2025

Thanks @mattzcarey - I'm going to re-open a PR with the latest branch from main.

It seems like it works pretty well!

@Phiph Phiph closed this Jan 17, 2025
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.

2 participants