mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2026-01-22 07:05:59 +08:00
add stepfun models
This commit is contained in:
@@ -43,6 +43,10 @@ const DEFAULT_TENCENT_URL = isApp
|
||||
? DEFAULT_API_HOST + "/api/proxy/tencent"
|
||||
: ApiPath.Tencent;
|
||||
|
||||
const DEFAULT_STEPFUN_URL = isApp
|
||||
? DEFAULT_API_HOST + "/api/proxy/stepfun"
|
||||
: ApiPath.Stepfun;
|
||||
|
||||
const DEFAULT_MOONSHOT_URL = isApp
|
||||
? DEFAULT_API_HOST + "/api/proxy/moonshot"
|
||||
: ApiPath.Moonshot;
|
||||
@@ -107,6 +111,10 @@ const DEFAULT_ACCESS_STATE = {
|
||||
tencentSecretKey: "",
|
||||
tencentSecretId: "",
|
||||
|
||||
// stepfun
|
||||
stepfunUrl: DEFAULT_STEPFUN_URL,
|
||||
stepfunApiKey: "",
|
||||
|
||||
// iflytek
|
||||
iflytekUrl: DEFAULT_IFLYTEK_URL,
|
||||
iflytekApiKey: "",
|
||||
@@ -164,9 +172,14 @@ export const useAccessStore = createPersistStore(
|
||||
return ensure(get(), ["tencentSecretKey", "tencentSecretId"]);
|
||||
},
|
||||
|
||||
isValidStepfun() {
|
||||
return ensure(get(), ["stepfunApiKey"]);
|
||||
},
|
||||
|
||||
isValidMoonshot() {
|
||||
return ensure(get(), ["moonshotApiKey"]);
|
||||
},
|
||||
|
||||
isValidIflytek() {
|
||||
return ensure(get(), ["iflytekApiKey"]);
|
||||
},
|
||||
@@ -183,7 +196,8 @@ export const useAccessStore = createPersistStore(
|
||||
this.isValidBaidu() ||
|
||||
this.isValidByteDance() ||
|
||||
this.isValidAlibaba() ||
|
||||
this.isValidTencent ||
|
||||
this.isValidTencent() ||
|
||||
this.isValidStepfun() ||
|
||||
this.isValidMoonshot() ||
|
||||
this.isValidIflytek() ||
|
||||
!this.enabledAccessControl() ||
|
||||
|
||||
Reference in New Issue
Block a user