mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
fix(ApiService): remove quotes from message summaries
- Updated the fetchMessagesSummary function to remove all quotes from the generated summaries, ensuring cleaner output for the user.
This commit is contained in:
parent
29689318cf
commit
ae4fed7e0b
@ -227,7 +227,9 @@ export async function fetchMessagesSummary({ messages, assistant }: { messages:
|
||||
const AI = new AiProvider(provider)
|
||||
|
||||
try {
|
||||
return await AI.summaries(filterMessages(messages), assistant)
|
||||
const text = await AI.summaries(filterMessages(messages), assistant)
|
||||
// Remove all quotes from the text
|
||||
return text?.replace(/["']/g, '') || null
|
||||
} catch (error: any) {
|
||||
return null
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user