fix: fix type errors

This commit is contained in:
Fred Liang
2023-12-24 02:39:06 +08:00
parent ae0d68c27e
commit 45798f993d
5 changed files with 46 additions and 4 deletions

View File

@@ -4,7 +4,15 @@ export function collectModelTable(
models: readonly LLMModel[],
customModels: string,
) {
const modelTable: { [key: string]: LLMModel } = {};
const modelTable: Record<
string,
{
available: boolean;
name: string;
displayName: string;
provider: LLMModel["provider"];
}
> = {};
// default models
models.forEach(