fix: select AzureOpenAI deployment based on selected model
As discussed in #369, this specifies the deploymentName enabling the AzureOpenAI provider to work as expected.
One shortcoming of this approach is that it assumes modelName and deployment are the same. The Deployment Name textbox on Azure Portal defaults to the name of the model, but you can change it to whatever you want. I always keep them identical to save confusion, but that may not fit every use case.
Would have to double check the AzureOpenAI class to see if it even uses both... not sure why the client would need to know the OpenAI model being served as long as it can reach the deployment resource. If it does require it, I suppose the solution would be another field in Void Settings where you specify the model and the deployment?
Thanks for this, super useful! You're right, we might want to add a new setting for deploymentName too, but for now I think we should keep it simple and just assume the two are the same. I think we can just not set deploymentName here, if we're just setting it to modelName, right? Can you comment that out for now and maybe add a note? Great work!
I think we can just not set deploymentName here, if we're just setting it to modelName, right?
@andrewpareles you get a 404 if you don't specify the deployment name. How I have it works if you add a few models and switch between them
Great, thanks so much for this!