mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
feat: title trim quotation marks
This commit is contained in:
@@ -182,7 +182,7 @@ export const generateTitle = async (
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res?.response ?? 'New Chat';
|
return res?.response.replace(/["']/g, '') ?? 'New Chat';
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generatePrompt = async (token: string = '', model: string, conversation: string) => {
|
export const generatePrompt = async (token: string = '', model: string, conversation: string) => {
|
||||||
|
|||||||
@@ -316,5 +316,5 @@ export const generateTitle = async (
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res?.choices[0]?.message?.content ?? 'New Chat';
|
return res?.choices[0]?.message?.content.replace(/["']/g, '') ?? 'New Chat';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user