(state: StreamingState)
| 88 | } |
| 89 | |
| 90 | function resolveStreamedContent(state: StreamingState): Map<string, string> { |
| 91 | const result = new Map<string, string>() |
| 92 | for (const [blockId, chunks] of state.streamedChunks) { |
| 93 | result.set(blockId, chunks.join('')) |
| 94 | } |
| 95 | return result |
| 96 | } |
| 97 | |
| 98 | type OutputExtractionContext = Pick< |
| 99 | StreamingResponseOptions, |