Closed HuaDeity closed 8 months ago
This is considerably more complex than it needs to be. A simpler approach is to add ?.
before the delta
, so it becomes:
const responseText = chunks.map(item => item["choices"][0]?.["delta"]["content"]).join("")
Please try that in your local set up and report back. If it works, no need to change anything in this PR, as I already have the change locally.
This is considerably more complex than it needs to be. A simpler approach is to add
?.
before thedelta
, so it becomes:const responseText = chunks.map(item => item["choices"][0]?.["delta"]["content"]).join("")
Please try that in your local set up and report back. If it works, no need to change anything in this PR, as I already have the change locally.
Yes, the simple approach successfully fix the issue, thank you.
Thank you for checking and for identifying the issues and submitting the pull requests. The changes will be in the next release.
@HuaDeity Until the next release is officially out, you can use this one which already has the changes.
@vitorgalvao
Thank you for kindly fixing this issue.
Fix #11.