feat: chat model show

This commit is contained in:
archer
2023-07-25 16:11:16 +08:00
parent 35718b1f26
commit e5e720e87e
13 changed files with 72 additions and 53 deletions

View File

@@ -1,13 +1,13 @@
export const getChatModel = (model: string) => {
export const getChatModel = (model?: string) => {
return global.chatModels.find((item) => item.model === model);
};
export const getVectorModel = (model: string) => {
export const getVectorModel = (model?: string) => {
return global.vectorModels.find((item) => item.model === model);
};
export const getQAModel = (model: string) => {
export const getQAModel = (model?: string) => {
return global.qaModels.find((item) => item.model === model);
};
export const getModel = (model: string) => {
export const getModel = (model?: string) => {
return [...global.chatModels, ...global.vectorModels, ...global.qaModels].find(
(item) => item.model === model
);