fix: Resolve proxy error when adding Azure OpenAI model

This commit is contained in:
Aplulu 2025-02-21 02:49:36 +09:00
parent 4a96bf7343
commit 17dbfe6bfd
No known key found for this signature in database
GPG key ID: 1F716551AB264850

View file

@ -40,8 +40,10 @@ export class AzureOpenAIApi implements BaseLlmApi {
if (PROXY) {
const url = new URL(PROXY);
proxyOptions = {
host: url.hostname,
port: Number(url.port),
host: (url.protocol ? url.protocol + "//" : "") + url.hostname,
port: Number(url.port || 80),
username: url.username,
password: url.password,
};
}