Function: useServingStream()
useServingStream<
K>(body,options?):UseServingStreamResult<InferServingChunk<K>,InferServingRequest<K>>
Hook for streaming invocation of a serving endpoint via SSE.
Calls POST /api/serving/stream (default) or POST /api/serving/{alias}/stream (named).
Accumulates parsed chunks in state.
When the type generator has populated ServingEndpointRegistry, the chunk type
is automatically inferred from the endpoint’s OpenAPI schema.
Type Parameters
Section titled “Type Parameters”K extends string = string
Parameters
Section titled “Parameters”options?
Section titled “options?”UseServingStreamOptions<K, InferServingChunk<K>>
Returns
Section titled “Returns”UseServingStreamResult<InferServingChunk<K>, InferServingRequest<K>>