chat bot with nextjs
i have created workflow chat wi supabse and in text mode working fine but if I implement this in nextjs app and start chat that show error I was attaching image here.
this is error wile chat with bot
Solution:Jump to solution
In your workflow you are taking the prompt form the query not from the body. change the prompt to (x)Body.message, it should work then, note here that the body is the variable from the Rest API Request.
3 Replies
It looks like you're encountering an error related to missing required parameters in your API's POST request body. Based on the error message, it seems that the
messages[0].content
parameter is not being passed correctly from your client side on the chat widget.
To resolve this issue, ensure that your API's POST request body contains all the necessary parameters, including prompt
and threadId
. You can refer to the relevant section of the documentation for more details:
BuildShip Chat Widget - Requirements for Your BuildShip Workflow
If you need further assistance, you can submit your query via the in-app support button.GitHub
GitHub - rowyio/buildship-chat-widget: AI Chat Widget - flexible an...
AI Chat Widget - flexible and lite chat widget that can connect to OpenAI Assistant, any database, tools - rowyio/buildship-chat-widget
i was passing this as payload but still same error
@Gaurav Chadha
Solution
In your workflow you are taking the prompt form the query not from the body. change the prompt to (x)Body.message, it should work then, note here that the body is the variable from the Rest API Request.