refactor: #1000 #1179 api layer for client-side only mode and local models

This commit is contained in:
Yidadaa
2023-05-15 01:33:46 +08:00
parent bd90caa99d
commit a3de277c43
15 changed files with 247 additions and 593 deletions

View File

@@ -2,7 +2,7 @@ import { create } from "zustand";
import { persist } from "zustand/middleware";
import { BUILTIN_MASKS } from "../masks";
import { getLang, Lang } from "../locales";
import { DEFAULT_TOPIC, Message } from "./chat";
import { DEFAULT_TOPIC, ChatMessage } from "./chat";
import { ModelConfig, ModelType, useAppConfig } from "./config";
import { StoreKey } from "../constant";
@@ -10,7 +10,7 @@ export type Mask = {
id: number;
avatar: string;
name: string;
context: Message[];
context: ChatMessage[];
modelConfig: ModelConfig;
lang: Lang;
builtin: boolean;