Repository navigation
What's Changed
- A Messages stream gives its text as it arrives with
text(), and the whole message it adds up to withfinalMessage(), the sameCreateResponsethatcreate()returns.finalText(),currentMessage()and callbacks per event kind (onEvent(),onText(),onThinking(),onContentBlock(),onMessage()) come with them, and all of it works on fake streams. MessageAccumulatorfolds stream events you read another way into the message they add up to.RefusalFallbackMiddlewarefalls back on streamed requests too: a refused stream goes on with the next model's events spliced onto it, behind afallbackblock, under onemessage_start.- The middleware takes every
fallbackblock out of the history you send back, where it used to take only those at the front of a turn. CreateResponse::$stop_reasonis nullable, for a message folded from a stream before itsmessage_delta.
UPGRADING.md lists the changes that can affect code written against 1.14, such as the nullable stop_reason and a subclass of the Messages StreamResponse that declares one of its new methods.
Full Changelog: 1.14.0...1.15.0