support azure deployment name

This commit is contained in:
lloydzhou
2024-07-05 19:59:45 +08:00
parent c4a6c933f8
commit 1c20137b0e
15 changed files with 143 additions and 74 deletions

View File

@@ -69,6 +69,11 @@ if (mode !== "export") {
source: "/api/proxy/v1/:path*",
destination: "https://api.openai.com/v1/:path*",
},
{
// https://{resource_name}.openai.azure.com/openai/deployments/{deploy_name}/chat/completions
source: "/api/proxy/azure/:resource_name/deployments/:deploy_name/:path*",
destination: "https://:resource_name.openai.azure.com/openai/deployments/:deploy_name/:path*",
},
{
source: "/api/proxy/google/:path*",
destination: "https://generativelanguage.googleapis.com/:path*",