# `Spectre.Inference.Request`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/inference/request.ex#L1)

One typed, purpose-labelled inference invocation.

# `t`

```elixir
@type t() :: %Spectre.Inference.Request{
  attempt: pos_integer(),
  constraints: Spectre.Inference.Constraints.t(),
  flow: term(),
  id: String.t(),
  metadata: map(),
  modalities: [atom()],
  plan: Spectre.Prompt.Plan.t(),
  previous_errors: [term()],
  purpose: term(),
  route: term()
}
```

# `for_classification`

```elixir
@spec for_classification(
  Spectre.Prompt.Plan.t(),
  Spectre.Context.t() | map(),
  keyword()
) :: t()
```

Builds a route-classification request around an already composed prompt plan.

# `for_response`

```elixir
@spec for_response(Spectre.Prompt.Plan.t(), Spectre.Context.t(), keyword()) :: t()
```

Builds the response-generation request used by `Spectre.Runner`.

# `new`

```elixir
@spec new(map() | keyword()) :: t()
```

---

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