openai.DecisionsClient
OpenAI Decisions (POST {base_url}/decisions), with TypeSafe-style outputs. Bool outputs threshold a predicate at 0.5; float outputs retain its probability. Enums and finite unions use Choice. Classes flatten into one question per leaf. Use role("instructions") or @description for questions, and user content for evidence. Text and images are supported; tools and streaming are not. Float outputs are probabilities, not the API's ordered-rubric score type.
Signature
class openai.DecisionsClientOpenAI Decisions (POST {base_url}/decisions), with TypeSafe-style outputs. Bool outputs threshold a predicate at 0.5; float outputs retain its probability. Enums and finite unions use Choice. Classes flatten into one question per leaf. Use role("instructions") or @description for questions, and user content for evidence. Text and images are supported; tools and streaming are not. Float outputs are probabilities, not the API's ordered-rubric score type.
Source:<builtin>/openai/decisions.bamlbytes 481–2329
Fields
model
stringapi_key
ai.Credential | nullbase_url
ai.Credential | nulltimeout
baml.time.Duration | ai.LlmTimeoutOptions | nullcapture_wire
boolStatic methods
new
(Construction is pure. Credentials resolve when invoking, using OPENAI_API_KEY unless an explicit credential is provided.
Implementations
ai.Client for openai.DecisionsClient
Instance methods
default_cache_args
(self) -> baml.json.json throws neverThe args this client uses for a ${cache()} written with none (or
with null): the object its wire's cache marker carries. Null when the
client has no cache marker on its wire, or when the model it is
configured for would reject one; a ${cache()} then sends nothing.
A client that sends cache markers passes this to
ai.wire.prompt_parts(message, default_cache_args).
id
(self) -> string throws neverinvoke
(render
(Preview the request without resolving credentials or performing IO.
Source:<builtin>/openai/decisions.bamlbytes 1626–2327