mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
4.8.9 test (#2299)
* perf: read file prompt * perf: read file prompt * perf: free plan tip * feat: cron job usage * perf: app templates * perf: get llm model by name * feat: support outlink upload file * fix: upload limit
This commit is contained in:
@@ -1,20 +1,28 @@
|
||||
export const getLLMModel = (model?: string) => {
|
||||
return global.llmModels.find((item) => item.model === model) ?? global.llmModels[0];
|
||||
return (
|
||||
global.llmModels.find((item) => item.model === model || item.name === model) ??
|
||||
global.llmModels[0]
|
||||
);
|
||||
};
|
||||
export const getDatasetModel = (model?: string) => {
|
||||
return (
|
||||
global.llmModels?.filter((item) => item.datasetProcess)?.find((item) => item.model === model) ??
|
||||
global.llmModels[0]
|
||||
global.llmModels
|
||||
?.filter((item) => item.datasetProcess)
|
||||
?.find((item) => item.model === model || item.name === model) ?? global.llmModels[0]
|
||||
);
|
||||
};
|
||||
|
||||
export const getVectorModel = (model?: string) => {
|
||||
return global.vectorModels.find((item) => item.model === model) || global.vectorModels[0];
|
||||
return (
|
||||
global.vectorModels.find((item) => item.model === model || item.name === model) ||
|
||||
global.vectorModels[0]
|
||||
);
|
||||
};
|
||||
|
||||
export function getAudioSpeechModel(model?: string) {
|
||||
return (
|
||||
global.audioSpeechModels.find((item) => item.model === model) || global.audioSpeechModels[0]
|
||||
global.audioSpeechModels.find((item) => item.model === model || item.name === model) ||
|
||||
global.audioSpeechModels[0]
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -95,7 +95,7 @@ export const dispatchReadFiles = async (props: Props): Promise<Response> => {
|
||||
})
|
||||
.filter(Boolean)
|
||||
.slice(0, maxFiles);
|
||||
console.log(parseUrlList);
|
||||
|
||||
const readFilesResult = await Promise.all(
|
||||
parseUrlList
|
||||
.map(async (url) => {
|
||||
|
Reference in New Issue
Block a user