add stepfun models

This commit is contained in:
chenlinfeng
2024-08-16 16:31:42 +08:00
parent 122aa94c9f
commit e29ea54f2c
11 changed files with 521 additions and 3 deletions

View File

@@ -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() ||