mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2026-01-03 10:06:57 +00:00
feat(media, suggestions): handle chat history correctly
This commit is contained in:
@@ -20,7 +20,10 @@ export const POST = async (req: Request) => {
|
||||
|
||||
const suggestions = await generateSuggestions(
|
||||
{
|
||||
chatHistory: body.chatHistory,
|
||||
chatHistory: body.chatHistory.map(([role, content]) => ({
|
||||
role: role === 'human' ? 'user' : 'assistant',
|
||||
content,
|
||||
})),
|
||||
},
|
||||
llm,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user