NewStreamRewriter creates a new stream rewriter.
(options StreamRewriteOptions)
| 59 | |
| 60 | // NewStreamRewriter creates a new stream rewriter. |
| 61 | func NewStreamRewriter(options StreamRewriteOptions) *StreamRewriter { |
| 62 | return &StreamRewriter{ |
| 63 | options: options, |
| 64 | pendingBuf: nil, |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | // RewriteChunk rewrites model names in a single SSE chunk. |
| 69 | func (r *StreamRewriter) RewriteChunk(chunk []byte) []byte { |
no outgoing calls