rubberduck-ai / rubberduck-vscode

Use AI-powered code edits, explanations, code generation, error diagnosis, and chat in Visual Studio Code with the official OpenAI API.
https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode
MIT License
607 stars 77 forks source link

Azure AI connection #107

Open stelucz opened 1 year ago

stelucz commented 1 year ago

I did not find way to connect Rubberduck to my Azure OpenAI deployment. Is it even supported? Thanks a lot.

ntaylor-ads commented 11 months ago

I would also like to request support for Azure AI Studio models. The API is nearly identical to OpenAI, so it should not be too hard to add.

riotrah commented 8 months ago

It's a bit different actually, tho not enough to be much work. I somewhat recently refactored a chatbot UI lib (can't remember which) to support azure openai in addition to public chatgpt.

The biggest difference is that with public chatgpt, there's only one endpoint to connect to, and it accepts the model (and/or version, iirc) as a parameter for each call, whereas azure openai, each model/version is deployed separately, and so you have different endpoints (and thus different api keys, etc) for each model/version.

In practical terms, in that refactor I did, I had to generalize the endpoint config so that it assumed endpoint was an array of objects with their own api key and model and such, and in the models selector UX, make several api calls per endpoint etc, and then remember the model<->endpoint mapping for making the actual chat api call.

Not having looked at this codebase at all, I don't think this would be a super big lift.