mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 05:08:14 +00:00
feat: title trim quotation marks
This commit is contained in:
parent
7f617225a0
commit
9aa689ea56
@ -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';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user