Merge branch 'PingChuan' into shiy-login

# Conflicts:
#	app/config/api-config.ts
This commit is contained in:
2025-12-03 12:10:21 +08:00
33 changed files with 6104 additions and 1477 deletions
+34 -15
View File
@@ -28,6 +28,13 @@ interface ApiConfig {
// 应用ID(用于登出)
appId?: string;
};
// Dify 知识库检索配置
dify: {
// Reranking 模型提供商
rerankingProviderName: string;
// Reranking 模型名称
rerankingModelName: string;
};
}
// 端口特定配置映射
@@ -37,17 +44,12 @@ const portConfigs: Record<string, Partial<ApiConfig>> = {
// 主要
// 梅州
'51703': {
// baseUrl: 'http://172.16.0.55:8073',
// documentUrl: 'http://172.16.0.55:8073/docauditai/',
// uploadUrl: 'http://172.16.0.55:8073/admin/documents',
// collaboraUrl: 'http://172.16.0.81:9980',
// appUrl: 'http://172.16.0.34:51703',
baseUrl: 'http://172.16.0.78:8073',
documentUrl: 'http://172.16.0.78:8073/docauditai/',
uploadUrl: 'http://172.16.0.78:8073/admin/documents',
baseUrl: 'http://10.79.97.17:8000',
documentUrl: 'http://10.79.97.17:8000/docauditai/',
uploadUrl: 'http://10.79.97.17:8000/admin/documents',
collaboraUrl: 'http://10.79.97.17:9980',
appUrl: 'http://10.79.97.17:51703',
collaboraUrl: 'http://172.16.0.81:9980',
appUrl: 'http://172.16.0.34:51703',
oauth: {
redirectUri: 'http://10.79.97.17:51703/callback'
@@ -127,15 +129,18 @@ const configs: Record<string, ApiConfig> = {
// uploadUrl: 'http://172.16.0.55:8073/admin/documents',
collaboraUrl: 'http://172.16.0.81:9980',
// appUrl: 'http://172.16.0.34:51709',
appUrl: 'http://172.16.0.34:5173',
appUrl: 'http://172.16.0.78:51703',
oauth: {
serverUrl: 'http://10.79.112.85', // IDaaS服务器地址
clientId: 'none',
clientSecret: 'none', // 需要替换为实际的Client Secret
redirectUri: 'http://10.79.97.17/', // 回调地址
appId: 'idaasoauth2' // 应用ID,用于登出
},
dify: {
rerankingProviderName: 'langgenius/tongyi/tongyi',
rerankingModelName: 'gte-rerank'
}
},
@@ -152,6 +157,10 @@ const configs: Record<string, ApiConfig> = {
clientSecret: 'placeholder', // 需要替换为实际的Client Secret
redirectUri: 'http://10.79.97.17/', // 回调地址
appId: 'idaasoauth2' // 应用ID,用于登出
},
dify: {
rerankingProviderName: 'langgenius/tongyi/tongyi',
rerankingModelName: 'gte-rerank'
}
},
@@ -173,6 +182,10 @@ const configs: Record<string, ApiConfig> = {
clientSecret: 'placeholder', // 占位符,实际值从环境变量获取
redirectUri: 'http://10.79.97.17/', // 回调地址
appId: 'idaasoauth2' // 应用ID,用于登出
},
dify: {
rerankingProviderName: 'langgenius/tongyi/tongyi',
rerankingModelName: 'gte-rerank'
}
},
@@ -189,6 +202,10 @@ const configs: Record<string, ApiConfig> = {
clientSecret: 'your_client_secret', // 需要替换为实际的Client Secret
redirectUri: 'http://172.16.0.119:3000/callback', // 回调地址
appId: 'idaasoauth2' // 应用ID,用于登出
},
dify: {
rerankingProviderName: 'langgenius/tongyi/tongyi',
rerankingModelName: 'gte-rerank'
}
}
};
@@ -238,7 +255,8 @@ const getConfigFromEnv = (defaultConfig: ApiConfig): ApiConfig => {
clientSecret: process.env.OAUTH_CLIENT_SECRET || defaultConfig.oauth.clientSecret,
redirectUri: process.env.NEXT_PUBLIC_OAUTH_REDIRECT_URI || defaultConfig.oauth.redirectUri,
appId: process.env.NEXT_PUBLIC_OAUTH_APP_ID || defaultConfig.oauth.appId
}
},
dify: defaultConfig.dify
};
};
@@ -366,7 +384,8 @@ export const {
uploadUrl: UPLOAD_URL,
collaboraUrl: COLLABORA_URL,
appUrl: APP_URL,
oauth: OAUTH_CONFIG
oauth: OAUTH_CONFIG,
dify: DIFY_CONFIG
} = apiConfig;
/**