# `ExAthena.Request`
[🔗](https://github.com/udin-io/ex_athena/blob/v0.7.1/lib/ex_athena/request.ex#L1)

A normalised inference request.

Every provider receives an `ExAthena.Request` and is responsible for mapping
it to its own wire format. Keeping the shared shape here means callers don't
need to think about whether they're talking to Ollama, OpenAI, or Claude.

# `t`

```elixir
@type t() :: %ExAthena.Request{
  max_tokens: pos_integer() | nil,
  messages: [ExAthena.Messages.Message.t()],
  metadata: map() | nil,
  model: String.t() | nil,
  provider_opts: keyword() | nil,
  response_format: :text | :json | map() | nil,
  stop: [String.t()] | String.t() | nil,
  system_prompt: String.t() | nil,
  temperature: float() | nil,
  timeout_ms: pos_integer() | nil,
  tool_choice: :auto | :any | :none | map() | nil,
  tools: [map()] | nil,
  top_p: float() | nil
}
```

# `new`

```elixir
@spec new(
  String.t() | nil,
  keyword()
) :: t()
```

Build a request from a raw user prompt and options.

The prompt is prepended to `opts[:messages]` as a user message. Pass `nil`
to start from a pre-built message list.

---

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