NewTransportFactory returns an [aibridge.TransportFactory] whose RoundTripper dispatches requests to handler in-process, streaming the response body through an [io.Pipe] so SSE/NDJSON/chunked responses propagate token-by-token just as they would over the wire. handler is typically the aibridged HTT
(handler http.Handler)
| 27 | // handler is typically the aibridged HTTP entrypoint registered via |
| 28 | // [API.RegisterInMemoryAIBridgedHTTPHandler]. |
| 29 | func NewTransportFactory(handler http.Handler) aibridge.TransportFactory { |
| 30 | return &transportFactory{handler: handler} |
| 31 | } |
| 32 | |
| 33 | type transportFactory struct { |
| 34 | handler http.Handler |
no outgoing calls