You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @chitalian can you share an example of something that breaks the SDK streaming logic? The SDK should handle events that come through multiple chunks.
Maybe you ran into #292? (which will be fixed in the next release)
In some environments, each chunk is not received as a single chunk, but rather the chunk is split up into two chunks.
Right now, the typescript SDK assumes each chunk is formatted as
However, this is not always the case. Can we add more robust chunking algorithm that waits for all the parts of the chunks?
Proposed fix
Within
_createMessage
(anthropic-sdk-typescript/src/lib/MessageStream.ts
Line 123 in c7db92c
We can wait and look for the whole chunk to arrive before adding the next stream event
Additional notes
The OpenAI Python and Typescript Packages handle this.
The Ruby OpenAI packages that are community ran, run into this issue: alexrudall/ruby-openai#411
The text was updated successfully, but these errors were encountered: