mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-20 14:32:42 +08:00
feat: add multi-model support
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createWebDavClient } from "./webdav";
|
||||
import { createUpstashClient } from "./upstash";
|
||||
import { SyncStore } from "@/app/store/sync";
|
||||
|
||||
export enum ProviderType {
|
||||
WebDAV = "webdav",
|
||||
@@ -27,7 +28,7 @@ export type SyncClient = {
|
||||
|
||||
export function createSyncClient<T extends ProviderType>(
|
||||
provider: T,
|
||||
config: SyncClientConfig[T],
|
||||
store: SyncStore,
|
||||
): SyncClient {
|
||||
return SyncClients[provider](config as any) as any;
|
||||
return SyncClients[provider](store);
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ export function createUpstashClient(store: SyncStore) {
|
||||
|
||||
async get() {
|
||||
const chunkCount = Number(await this.redisGet(chunkCountKey));
|
||||
if (!Number.isInteger(chunkCount)) return;
|
||||
if (!Number.isInteger(chunkCount)) return "";
|
||||
|
||||
const chunks = await Promise.all(
|
||||
new Array(chunkCount)
|
||||
|
Reference in New Issue
Block a user