def open.budget

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

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

499def open.budget(+api: Api, +base: String, +headers: Map<&2, List<&2, String>>, body: Bytes.Bytes, y: Hairpin.Client & Retry.Budget) ->
500    IO(Hairpin.Client & Retry.Budget & Result<&1, &1, Hairpin.Err, Http.Stream>):
501  (h, b) = y
502  do IO<Hairpin.Client & Retry.Budget & Result<&1, &1, Hairpin.Err, Http.Stream>>:
503    enc : String <- Http.codings()
504    Hairpin.open.as(~open.judge, h, b, True{}, enc, "POST", url(api, base), headers, body)

Uses (19)

Used by (1)