mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
perf: model provider show; perf: get init data buffer (#3459)
* pr code * perf: model table show * perf: model provider show * perf: get init data buffer * perf: get init data buffer * perf: icon
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { LLMModelItemType, VectorModelItemType } from './model.d';
|
||||
import { i18nT } from '../../../web/i18n/utils';
|
||||
import type { LLMModelItemType, STTModelType, VectorModelItemType } from './model.d';
|
||||
import { getModelProvider, ModelProviderIdType } from './provider';
|
||||
|
||||
export const defaultQAModels: LLMModelItemType[] = [
|
||||
@@ -35,6 +36,13 @@ export const defaultVectorModels: VectorModelItemType[] = [
|
||||
}
|
||||
];
|
||||
|
||||
export const defaultWhisperModel: STTModelType = {
|
||||
provider: 'OpenAI',
|
||||
model: 'whisper-1',
|
||||
name: 'whisper-1',
|
||||
charsPointsPrice: 0
|
||||
};
|
||||
|
||||
export const getModelFromList = (
|
||||
modelList: { provider: ModelProviderIdType; name: string; model: string }[],
|
||||
model: string
|
||||
@@ -46,3 +54,16 @@ export const getModelFromList = (
|
||||
avatar: provider.avatar
|
||||
};
|
||||
};
|
||||
|
||||
export enum ModelTypeEnum {
|
||||
chat = 'chat',
|
||||
embedding = 'embedding',
|
||||
tts = 'tts',
|
||||
stt = 'stt'
|
||||
}
|
||||
export const modelTypeList = [
|
||||
{ label: i18nT('common:model.type.chat'), value: ModelTypeEnum.chat },
|
||||
{ label: i18nT('common:model.type.embedding'), value: ModelTypeEnum.embedding },
|
||||
{ label: i18nT('common:model.type.tts'), value: ModelTypeEnum.tts },
|
||||
{ label: i18nT('common:model.type.stt'), value: ModelTypeEnum.stt }
|
||||
];
|
||||
|
Reference in New Issue
Block a user