mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 14:25:19 +00:00
fix: sanatizeResponseContent for stop token display
This commit is contained in:
parent
3b70841a7d
commit
898b65a653
1 changed files with 8 additions and 8 deletions
|
|
@ -83,9 +83,9 @@ export const sanitizeResponseContent = (content: string) => {
|
||||||
.replace(/<\|[a-z]*$/, '')
|
.replace(/<\|[a-z]*$/, '')
|
||||||
.replace(/<\|[a-z]+\|$/, '')
|
.replace(/<\|[a-z]+\|$/, '')
|
||||||
.replace(/<$/, '')
|
.replace(/<$/, '')
|
||||||
.replaceAll(/<\|[a-z]+\|>/g, ' ')
|
|
||||||
.replaceAll('<', '<')
|
.replaceAll('<', '<')
|
||||||
.replaceAll('>', '>')
|
.replaceAll('>', '>')
|
||||||
|
.replaceAll(/<\|[a-z]+\|>/g, ' ')
|
||||||
.trim();
|
.trim();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue