Christopher30
Christopher304mo ago

Could not send message: Unexpected end of JSON input

I built a workflow, using "Chat with Firebase" template. I changed from Antropic to OpenAI nodes. But when I shipped the worklfow and opened the chat widget, after trying to send a message to this assitant, I got error: "Could not send message: Unexpected end of JSON input" What did I do wrong? No changes was done to trigger or last node (return) in this workflow. I use "OpenAI Assistant (Stream Response)" module and also have enabled "stream response" at chat widget.
Solution:
Hi @Stepan_Molchan, I remember sending you email with the solution, can you check? The issue with the Google Docs was fixed and confirmed by you, for Perplexity there was an issue in the prompt values, as it expects a string but your prompt contained JSON values which was causing the issue, I've fixed it and sent you an email, you can check. Let us know if you get into any other issues.
Jump to solution
5 Replies
Christopher30
Christopher304mo ago
Some additional info: I copied now this template: https://buildship.app/remix?template=streaming-assistant to try a simple chat assistant without adding any other tools. Simply copying the template and adding my API key, assistant ID and instruction prompt. And it still doesn't work. The error message states: "Could not send message: Unexpected token 'H', "Hello! Rea"... is not valid JSON"
Stepan_Molchan
Stepan_Molchan4mo ago
Hi, Chrisopher! I have almost the same issue. Trying to build an OpenAI Assistant that can use different tools, like Google Docs retrieval, web site scraping and using Perplexity API. The problem is with the last. When I initiate a question that assume using Perplexity I have that error: [Unexpected token 'T', "To start a"... is not valid JSON]. At the same time, assistant work well with other tools. I have no Perplexity's credits used so I think it didn't even get a request, that's why i think we're doing something wrong with OpenAI Assistants node. Really hope anyone can help us
Christopher30
Christopher304mo ago
Hi Stepan! For me, this didn't work only when I used the chat offered by Buildship. If for example, I built the workflow using Telegram bot & OpenAI assistant, then everything worked fine. Maybe you need to try it too, Telegram bots can be built for free and at least it will give you a chance to test out your workflow even if you don't plan to use Telegram at the end.
Stepan_Molchan
Stepan_Molchan4mo ago
@Gaurav Chadha, can you take a look at our case?
Solution
Gaurav Chadha
Gaurav Chadha3mo ago
Hi @Stepan_Molchan, I remember sending you email with the solution, can you check? The issue with the Google Docs was fixed and confirmed by you, for Perplexity there was an issue in the prompt values, as it expects a string but your prompt contained JSON values which was causing the issue, I've fixed it and sent you an email, you can check. Let us know if you get into any other issues.