Repository navigation
v0.2.0
The /v1/systemone wire format is now served by open decision models as well
as TypeSafe. This release lets one application talk to several of them.
- Named endpoints:
config :jev, endpoints: [laya: [base_url: ...]]andendpoint: :laya
per call, fromJev.HTTP.post/3or aJev.Serverreply.config :jev, endpoint:changes
the default from:typesafe.Jev.HTTP.endpoint/1returns the resolved settings. - A named endpoint sends no
Authorizationheader unless it has anapi_key, and its
usd_per_million_inputdefaults to zero. Transport settings are inherited from the
top-level configuration. Jev.reply/3andJev.cost/2take the price. When a server omitsconfidence, it is
computed from the probabilities as TypeSafe defines it.- Telemetry metadata and
Jev.Errorcarry theendpointname. Jev.Wire: the response body asJSONCodecstructs. A 200 whose body does not fit the wire
format comes back as{:error, %JSONCodec.Error{}}instead of a crash, integers are accepted
where the API documents numbers, unknown fields are ignored, and
Jev.Wire.Response.schema/0is the JSON Schema of what the client accepts. Adds the
json_codecdependency.Jev.Test:respond/2answers aReq.Teststub from a reply-shaped map, reading the questions
from the request;error/3sends a failure;body/2is the pure half;request/1reads the
request.:plugbecomes an optional dependency for these.Jev.Backend: a behaviour with one callback,post/3.Jev.HTTPimplements it and stays the
default;backend:per request orconfig :jev, backend:picks another, for an in-process
model or a fake.Jev.Telemetry.span/4is the shared telemetry every backend wraps its work in,
so events carrybackendand are identical whatever answered.Jev.confidence/2is public: TypeSafe's confidence for a distribution.[:jev, :answer]fires only for questions the server answered. A partial reply used to crash the
request.