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