Everything works fine the first request after connecting my express.js backend to your frontend as per your instructions. But whenever I enter input into the chatbox for the second time it fails due to server responding with 400.
{
"status": "error",
"message": "Invalid payload for action \"chat-stream\". payload.conversationHistory contains invalid items"
}
{
"action": "chat-stream",
"payload": {
"message": "any",
"conversationHistory": [
{
"role": "user",
"message": "asda"
},
{
"role": "assistant",
"message": [
"Asda is a British",
" supermarket chain that is a",
" subsidiary of Walmart. It is one of",
" the largest retail chains in",
" the UK, selling groceries,",
" clothing, electronics, and other products."
]
}
]
}
}
Everything works fine the first request after connecting my express.js backend to your frontend as per your instructions. But whenever I enter input into the chatbox for the second time it fails due to server responding with 400.
Below is the response:
And here is the payload the front end is sending: