# `Omni.Dialects.OpenAIDecisions`
[🔗](https://github.com/aaronrussell/omni/blob/v2.0.0/lib/omni/dialects/openai_decisions.ex#L1)

Dialect implementation for the OpenAI Decisions format.

OpenAI's Decisions API (`POST /v1/decisions`), served by `gpt-6-luna`. See
`Omni.Dialect.Decision` for the behaviour.

## Encoding

- A state of one text part is sent as the `input` string. Any other state
  is one user message with a content part per state part: text as
  `input_text`, data as `input_json`.
- Questions are sent in order, each named by its key. Instructions of one
  text part are sent as a string, and one data part as its JSON text;
  several parts are an array of `input_text` parts, data JSON-encoded,
  since instructions take no `input_json`.
- Choices are sent as `{value, description}` and levels as
  `{label, description}`, keys as strings.
- Predicate criteria have no field in this API and are dropped.

## Answers

Probabilities are mapped back to the question's keys, in the question's
order. A refused question is answered with an `Omni.Answer.Refusal`; the
others are still answered.

## Options

- `:safety_identifier` - a stable identifier for the end user, for
  OpenAI's abuse detection
- `:prompt_cache_key` - groups requests that share a prefix for caching

## Compat flags

None.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
