- Issue created by @karthik.arumugam
- 🇺🇸United States SiliconValet
Here's a patch for the api settings form to allow provider selection. The patch also adds a conditional client based on the service provider.
That said, I'm not working with a typical Azure OpenAI implementation and don't know if this will work for everyone.
If you have any trouble with this patch, share your issues here and maybe I can help.
- 🇺🇸United States SiliconValet
Modified patch to include correct variable on submit handler
- last update
9 months ago 5 pass, 2 fail - last update
9 months ago 5 pass, 2 fail - last update
9 months ago 5 pass, 2 fail - Merge request !86Issue #3421373 by SiliconValet: Azure OpenAI integration support → (Open) created by SiliconValet
- Assigned to kevinquillen
- 🇺🇸United States kevinquillen
Thanks for posting, I will take a look at this next week. Got backed up on other issues.
- 🇺🇸United States j-barnes
@SiliconValet - thanks for the patch! I am getting the below error and I assuming this is because the getModels() function doesn't exist because the model is explicitly declared when creating the client, but most of the sub modules check for that function?
OpenAI\Exceptions\ErrorException: Resource not found in OpenAI\Transporters\HttpTransporter->throwIfJsonError() (line 131 of /var/www/html/vendor/openai-php/client/src/Transporters/HttpTransporter.php). OpenAI\Transporters\HttpTransporter->requestObject(Object) (Line: 28) OpenAI\Resources\Models->list() (Line: 86) Drupal\openai\OpenAIApi->getModels() (Line: 130)
- 🇨🇳China robbin.zhao
Thanks for your patch
I was thinking if i can use a proxy server forward to OpenAI while I was selecting azure api,
the logical is same, i input base url and apikey, but i failed, the openai said there was not api key.
So i added it in here, everything looks charm.
Hope no other problem appears. - 🇪🇸Spain Jorgillo
@j-barnes @siliconvalet
The thing is that, while it can get the Azure API Key, the model array is indeed a problem, as, not only the main configuration, but also most of the submodules expect said model array.This causes most submodules to show that same error, as they are not able to connect because they are not getting the config info as they expect.
Would it be possible when using azure to set somehow the model array with the fixed model version so other modules can keep working?
- 🇺🇸United States SiliconValet
I've added the ability to set an explicit model. I missed that in the previous patch.
This patch includes a check for the service provider selected and returns the explicit model provided if you're using Azure OpenAI.