unkeyed / unkey

Open source API management platform
https://go.unkey.com
Other
2.53k stars 242 forks source link

fix: simplify stream handling #1806

Closed domeccleston closed 1 week ago

domeccleston commented 1 week ago

Rather than reading the stream and then converting it back to an OpenAI-compatible response, just read it and stream in a loop

Also upgrades OpenAI and counts tokens from their API response

Huly®: ENG-1800

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 0:03am
4 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **dashboard** | ⬜️ Ignored ([Inspect](https://vercel.com/unkey/dashboard/AnHM2DBTTbVNEzqH6bBkQAnum5Te)) | [Visit Preview](https://dashboard-git-streaming-fix-unkey.vercel.app) | | Jun 26, 2024 0:03am | | **planetfall** | ⬜️ Ignored ([Inspect](https://vercel.com/unkey/planetfall/76v41jDWtjYtu1yhoV1LtrxCeoHo)) | [Visit Preview](https://planetfall-git-streaming-fix-unkey.vercel.app) | | Jun 26, 2024 0:03am | | **play** | ⬜️ Ignored ([Inspect](https://vercel.com/unkey/play/844wmBTp19JgwJB1imetHCoM67UT)) | [Visit Preview](https://play-git-streaming-fix-unkey.vercel.app) | | Jun 26, 2024 0:03am | | **workflows** | ⬜️ Ignored ([Inspect](https://vercel.com/unkey/workflows/DvH46STad2dUtrg7jhUpdgscWfjz)) | [Visit Preview](https://workflows-git-streaming-fix-unkey.vercel.app) | | Jun 26, 2024 0:03am |
changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 4087cbbb2defcf71ca5919ee90a466f99387f7bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

github-actions[bot] commented 1 week ago

Thank you for following the naming conventions for pull request titles! 🙏