mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00

* mongo init * perf: mongo connect * perf: tts perf: whisper and tts peref: tts whisper permission log reabase (#488) * perf: modal * i18n * perf: schema lean * feat: vision model format * perf: tts loading * perf: static data * perf: tts * feat: image * perf: image * perf: upload image and title * perf: image size * doc * perf: color * doc * speaking can not select file * doc
7 lines
254 B
TypeScript
7 lines
254 B
TypeScript
import { IMG_BLOCK_KEY, FILE_BLOCK_KEY } from './constants';
|
|
|
|
export function chatContentReplaceBlock(content: string = '') {
|
|
const regex = new RegExp(`\`\`\`(${IMG_BLOCK_KEY})\\n([\\s\\S]*?)\`\`\``, 'g');
|
|
return content.replace(regex, '').trim();
|
|
}
|