fix: Resolve proxy error when adding Azure OpenAI model
This commit is contained in:
parent
4a96bf7343
commit
17dbfe6bfd
1 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue