mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
File input (#2270)
* doc * feat: file upload config * perf: chat box file params * feat: markdown show file * feat: chat file store and clear * perf: read file contentType * feat: llm vision config * feat: file url output * perf: plugin error text * perf: image load * feat: ai chat document * perf: file block ui * feat: read file node * feat: file read response field * feat: simple mode support read files * feat: tool call * feat: read file histories * perf: select file * perf: select file config * i18n * i18n * fix: ts; feat: tool response preview result
This commit is contained in:
@@ -91,3 +91,10 @@ export const sliceJsonStr = (str: string) => {
|
||||
|
||||
return jsonStr;
|
||||
};
|
||||
|
||||
export const sliceStrStartEnd = (str: string, start: number, end: number) => {
|
||||
const overSize = str.length > start + end;
|
||||
const startContent = str.slice(0, start);
|
||||
const endContent = overSize ? str.slice(-end) : '';
|
||||
return startContent + (overSize ? ` ...... ` : '') + endContent;
|
||||
};
|
||||
|
Reference in New Issue
Block a user