mirror of
https://github.com/open-webui/open-webui
synced 2024-11-27 22:43:17 +00:00
Also replace > with >
This commit is contained in:
parent
3a1fbb936b
commit
c9799991f2
@ -36,11 +36,14 @@ export const sanitizeResponseContent = (content: string) => {
|
|||||||
.replace(/<$/, '')
|
.replace(/<$/, '')
|
||||||
.replaceAll(/<\|[a-z]+\|>/g, ' ')
|
.replaceAll(/<\|[a-z]+\|>/g, ' ')
|
||||||
.replaceAll('<', '<')
|
.replaceAll('<', '<')
|
||||||
|
.replaceAll('>', '>')
|
||||||
.trim();
|
.trim();
|
||||||
};
|
};
|
||||||
|
|
||||||
export const revertSanitizedResponseContent = (content: string) => {
|
export const revertSanitizedResponseContent = (content: string) => {
|
||||||
return content.replaceAll('<', '<');
|
return content
|
||||||
|
.replaceAll('<', '<')
|
||||||
|
.replaceAll('>', '>');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const capitalizeFirstLetter = (string) => {
|
export const capitalizeFirstLetter = (string) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user