mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 22:12:33 +08:00
feat: close #935 add azure support
This commit is contained in:
9
app/azure.ts
Normal file
9
app/azure.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function makeAzurePath(path: string, apiVersion: string) {
|
||||
// should omit /v1 prefix
|
||||
path = path.replaceAll("v1/", "");
|
||||
|
||||
// should add api-key to query string
|
||||
path += `${path.includes("?") ? "&" : "?"}api-version=${apiVersion}`;
|
||||
|
||||
return path;
|
||||
}
|
Reference in New Issue
Block a user