feat: title trim quotation marks

This commit is contained in:
Timothy J. Baek 2024-05-06 16:59:54 -07:00
parent 7f617225a0
commit 9aa689ea56
2 changed files with 2 additions and 2 deletions

View File

@ -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) => {

View File

@ -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';
}; };