mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Display Think for Deepseek R1 model #4903 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -49,3 +49,11 @@ export const preprocessLaTeX = (content: string) => {
|
||||
);
|
||||
return inlineProcessedContent;
|
||||
};
|
||||
|
||||
export function replaceThinkToSection(text: string) {
|
||||
const pattern = /<think>([\s\S]*?)<\/think>/g;
|
||||
|
||||
const result = text.replace(pattern, '<section class="think">$1</section>');
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user