# Stream responses in next js without open ai package

**URL:** <https://community.openai.com/t/stream-responses-in-next-js-without-open-ai-package/568638>\
**Category:** API\
**Tags:** gpt-4, chatgpt, fine-tuning, api, chatgpt-plugin\
**Created:** [December 22, 2023, 10:38am UTC](https://community.openai.com/t/stream-responses-in-next-js-without-open-ai-package/568638 "2023-12-22T10:38:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrithik.d](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/hrithik.d/32/278527_2.png) [@hrithik.d](https://community.openai.com/u/hrithik.d)\
**Post date:** [December 22, 2023, 10:38am UTC](https://community.openai.com/t/stream-responses-in-next-js-without-open-ai-package/568638/1 "2023-12-22T10:38:49Z")

</div>

I’m eager to delve into the world of streaming responses from ChatGPT without relying on the OpenAI package. Could you share insights or tips on achieving this using alternative methods?

---

<div class="post-metadata">

**Author:** ![DarrenSem](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/darrensem/32/335268_2.png) [@DarrenSem](https://community.openai.com/u/DarrenSem)\
**Post date:** [March 18, 2024, 2:20am UTC](https://community.openai.com/t/stream-responses-in-next-js-without-open-ai-package/568638/2 "2024-03-18T02:20:06Z")

</div>

Any update to this thread that you started 3 months ago?

In general it as easy as adding “stream: true” to the body that you send to rhe API, but what comes back is a pretty ugly format – string chunks that are JSON, but in Node you might find some of them are incomplete so can’t be JSON.parse’d each.

Also you should include “signal” property in the fetch() options so you can AbortController.abort() – see MDN for that, some great examples.

GL!
