mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-03 05:46:54 +08:00
feat: mix handlers of proxy server in providers
This commit is contained in:
@@ -5,20 +5,44 @@ import { modelConfigs as openaiModelConfigs } from "../openai/config";
|
||||
|
||||
export const AzureMetas = {
|
||||
ExampleEndpoint: "https://{resource-url}/openai/deployments/{deploy-id}",
|
||||
ChatPath: "v1/chat/completions",
|
||||
ChatPath: "chat/completions",
|
||||
ListModelPath: "v1/models",
|
||||
};
|
||||
|
||||
export type SettingKeys = "azureUrl" | "azureApiKey" | "azureApiVersion";
|
||||
|
||||
export const preferredRegion: string | string[] = [
|
||||
"arn1",
|
||||
"bom1",
|
||||
"cdg1",
|
||||
"cle1",
|
||||
"cpt1",
|
||||
"dub1",
|
||||
"fra1",
|
||||
"gru1",
|
||||
"hnd1",
|
||||
"iad1",
|
||||
"icn1",
|
||||
"kix1",
|
||||
"lhr1",
|
||||
"pdx1",
|
||||
"sfo1",
|
||||
"sin1",
|
||||
"syd1",
|
||||
];
|
||||
|
||||
export const modelConfigs = openaiModelConfigs;
|
||||
|
||||
export const settingItems: SettingItem<SettingKeys>[] = [
|
||||
export const settingItems: (
|
||||
defaultEndpoint: string,
|
||||
) => SettingItem<SettingKeys>[] = (defaultEndpoint) => [
|
||||
{
|
||||
name: "azureUrl",
|
||||
title: Locale.Endpoint.Title,
|
||||
description: Locale.Endpoint.SubTitle + AzureMetas.ExampleEndpoint,
|
||||
placeholder: AzureMetas.ExampleEndpoint,
|
||||
type: "input",
|
||||
defaultValue: defaultEndpoint,
|
||||
validators: [
|
||||
async (v: any) => {
|
||||
if (typeof v === "string") {
|
||||
|
Reference in New Issue
Block a user