com.softinio.verdict4s.openai
Members list
Grouped members
OpenAI
OpenAI Decisions' wire format for the vendor-neutral protocol types.
OpenAI Decisions' wire format for the vendor-neutral protocol types.
Written against the DecisionRequest and DecisionResponse schemas of OpenAI's published OpenAPI spec. The translation from Jev's vocabulary:
| Shared model | OpenAI Decisions |
|---|---|
state |
input, as a string |
| question map | questions array, each carrying its key as name |
| Noul | predicate, answered with probability |
| Choice options | choices: [{value, description}] |
| Score levels | levels: [{label}], lowest first |
| probability maps | arrays of {value, probability} |
Score legend |
the label on each score probability |
The request encoding is a method rather than an Encoder, unlike in com.softinio.verdict4s.jev.JevCodecs, because it needs the request-level safety_identifier, which OpenAIVendor carries.
Attributes
- Supertypes
- Self type
-
OpenAICodecs.type
OpenAI Decisions.
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
Type members
Classlikes
The default vendor, and OpenAI's limits.
The default vendor, and OpenAI's limits.
Attributes
- Companion
- class
- Supertypes
- Self type
-
OpenAIVendor.type