Examples: Parsing a Streamed Response
Examples: Parsing a Streamed Response
Examples: Parsing a Streamed Response
Scenario: You receive streamed (SSE-style) responses from an action and want to parse it into objects.
An HTTP action returns a streamed response in this format:
You want to produce:
thread_id from the first objectdate from the first objecttextas a concatenation of all chunk valuesApproach
Treat the streamed output as a JSON array encoded as text:
In your compound action the return can reference the SSE action
Or