def stream.close

bend-kit-llm@0.13.0.1 · llm.bend:520

import bend-kit-llm@0.13.0.1/llm.bend as Llm
import Base
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin

520# Close a stream. A stream read to its end gives its connection to the client's pool.
521def stream.close(c: Client, s: Stream) -> IO(Client):
522  Client{api, base, headers, ms, n, h} = c
523  Stream{sa, st, rd} = s
524  do IO<Client>:
525    p : Hairpin.Client <- Hairpin.stream.close(h, st)
526    return Client{api, base, headers, ms, n, p}

Uses (7)

Used by (0)

No other definition uses this definition.