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,3 +1,5 @@
|
||||
import { useSystemStore } from './useSystemStore';
|
||||
|
||||
export const downloadFetch = async ({ url, filename }: { url: string; filename: string }) => {
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
@@ -6,3 +8,8 @@ export const downloadFetch = async ({ url, filename }: { url: string; filename:
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
};
|
||||
|
||||
export const getWebLLMModel = (model?: string) => {
|
||||
const list = useSystemStore.getState().llmModelList;
|
||||
return list.find((item) => item.model === model || item.name === model) ?? list[0];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user