def call
bend-kit-llm@0.13.0.1 · llm.bend:362
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
import bend-kit-retry@0.2.0.0/retry.bend as Retry
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
362
363
364def call(c: Client, body: Bytes.Bytes) -> IO(Client & Result<&1, &1, Err, Bytes.Bytes>):
365 Client{+api, +base, +headers, +ms, +n, h} = c
366 do IO<Client & Result<&1, &1, Err, Bytes.Bytes>>:
367 y : Hairpin.Client & Retry.Budget <- Hairpin.budget(Hairpin.retry(h, n))
368 x : Hairpin.Client & Retry.Budget & Result<&1, &1, Hairpin.Err, Http.Res> <- call.budget(api, base, headers, body, y)
369 return call.done(api, base, headers, ms, n, x)