feat: qwen

This commit is contained in:
Dogtiti
2024-07-07 21:59:56 +08:00
parent 7218f13783
commit 9bdd37bb63
8 changed files with 493 additions and 1 deletions

View File

@@ -47,6 +47,10 @@ const DEFAULT_ACCESS_STATE = {
anthropicApiVersion: "2023-06-01",
anthropicUrl: "",
// alibaba
alibabaUrl: "",
alibabaApiKey: "",
// server config
needCode: true,
hideUserApiKey: false,
@@ -83,6 +87,10 @@ export const useAccessStore = createPersistStore(
return ensure(get(), ["anthropicApiKey"]);
},
isValidAlibaba() {
return ensure(get(), ["alibabaApiKey"]);
},
isAuthorized() {
this.fetch();
@@ -92,6 +100,7 @@ export const useAccessStore = createPersistStore(
this.isValidAzure() ||
this.isValidGoogle() ||
this.isValidAnthropic() ||
this.isValidAlibaba() ||
!this.enabledAccessControl() ||
(this.enabledAccessControl() && ensure(get(), ["accessCode"]))
);