OpenAI Decisions.
POST https://api.openai.com/v1/decisions
{"model": "gpt-6-luna", "input": ..., "questions": [{"type": "predicate", "name": "q00", ...}]}
The base URL includes /v1, as it does in OpenAI's own SDKs, so that an OPENAI_BASE_URL set for them works here unchanged.
Stricter than Jev in three ways, each checked by validate before a request is sent: a Choice needs at least two options, a request carries at most 200 questions, and a Noul cannot describe what yes and no mean. And it may refuse a question, which Ask reports as Verdict4sError.Refused.
Value parameters
- safetyIdentifier
-
an opaque identifier for your end user, which OpenAI uses to detect abuse; at most 128 characters. Never your own account identity.
Attributes
Members list
Value members
Concrete methods
Read a successful response body.
Read a successful response body.
Attributes
The service's address. A String because core must not depend on http4s; the client turns it into a Uri.
The service's address. A String because core must not depend on http4s; the client turns it into a Uri.
Attributes
gpt-6-luna, the only model OpenAI Decisions supports.
gpt-6-luna, the only model OpenAI Decisions supports.
Attributes
Path segments of the evaluation endpoint, relative to the base URL.
Path segments of the evaluation endpoint, relative to the base URL.
Attributes
A human-readable name, for logs and error messages.
A human-readable name, for logs and error messages.
Attributes
Response header carrying the per-request correlation id.
Response header carrying the per-request correlation id.
Attributes
A response header giving the retry delay in milliseconds, consulted before the standard Retry-After.
A response header giving the retry delay in milliseconds, consulted before the standard Retry-After.
Attributes
- Definition Classes
An exhausted credit balance comes back as a 429, like a rate limit, but waiting does not fix it. Seen live: {"error": {"type": "insufficient_quota", "code": "credit_balance_exhausted", ...}}, with no x-should-retry header to say so.
An exhausted credit balance comes back as a 429, like a rate limit, but waiting does not fix it. Seen live: {"error": {"type": "insufficient_quota", "code": "credit_balance_exhausted", ...}}, with no x-should-retry header to say so.
Attributes
- Definition Classes
Reject requests this vendor cannot serve, such as a feature only the other vendor has, before they cost a round trip. Every problem is reported at once.
Reject requests this vendor cannot serve, such as a feature only the other vendor has, before they cost a round trip. Every problem is reported at once.
Attributes
- Definition Classes
The same vendor, sending safety_identifier with every request.
The same vendor, sending safety_identifier with every request.
Attributes
Inherited methods
The Authorization header value for a key.
Where to POST an evaluation, using the default base URL.
The headers every request needs, as plain pairs.
Parse a successful response body.
Parse a response and project it through the questions that produced it.
Parse a response and project it through the questions that produced it.
Attributes
- Inherited from:
- Vendor
Turn an unsuccessful response into a typed error.
Turn an unsuccessful response into a typed error.
Value parameters
- body
-
the raw body, which need not be JSON
- headers
-
the response headers, for the request id and the retry delay
- status
-
the HTTP status code
Attributes
- Inherited from:
- Vendor
Validate and encode in one step.
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Build, validate and render in one step, reporting every problem at once.
Build, validate and render in one step, reporting every problem at once.
Vendor.Jev.renderAsk(Ask(q1, q2), state)
Attributes
- Inherited from:
- Vendor
Render a request indented, for logs and documentation.