Rich91
Rich914mo ago

How to remove "Null" added to all returned open streams content

Hi, I’m currently developing a simple app using FlutterFlow, and I’ve implemented a streaming OpenAI call using a template. I’ve added the necessary keys for OpenAI and an assistant with Fileseach enabled. However, I’m encountering an issue where a Null value is being appended to the end of the stream content, and occasionally, a “Source” value is also included in the stream returned by the Buildship API. The “Source” value shouldn’t be mixed with the data, but it appears to be. How can I fix this and remove the Null values, as well as prevent the “Source” from being included in the stream?
Solution:
@Rich91 If you add a new OpenAI Streaming node from the node explorer into your project and copy over the inputs from your old node to your new node, you shouldn't experience the null issue any longer. Let us know how you get on.
Jump to solution
4 Replies
AI Support
AI Support4mo ago
AI Support Bot Information
<@771781324599722045> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support4mo ago
AI Response
It appears that your issue with Null values and unexpected "Source" values in the stream from the BuildShip API could be due to the data being malformed or not properly parsed. Here are a few steps to help you resolve the issue: 1. Check for Incomplete JSON Data: Ensure that the JSON data being fed into the BuildShip node is complete and properly structured. Incomplete data, such as missing closing brackets or braces, can result in unexpected Null values or additional data elements being appended. 2. Verify JSON Parsing: Make sure that the JSON data received is correctly parsed. If the data is being fetched from an external source, ensure that the source provides a complete and correct JSON. You can use online JSON validators to check the integrity of the data. 3. Node Configuration: Review the configuration of the node handling the JSON data in BuildShip. There may be settings or parameters that need adjustment to ensure the data is processed correctly. For additional details and troubleshooting, you can reference the BuildShip API Documentation . If these steps do not resolve the issue, it's recommended to submit a support request directly through the BuildShip in-app support for further assistance.
BuildShip AI Support
Stu
Stu4mo ago
Hi @Rich91 we're about to release an update to the OpenAI Streaming node which eliminates this issue. I'll update you when it's live.
Solution
Stu
Stu4mo ago
@Rich91 If you add a new OpenAI Streaming node from the node explorer into your project and copy over the inputs from your old node to your new node, you shouldn't experience the null issue any longer. Let us know how you get on.