# `PhoenixKitAI.TaskSetting`
[🔗](https://github.com/BeamLabEU/phoenix_kit_ai/blob/v0.26.1/lib/phoenix_kit_ai/task_setting.ex#L1)

What an admin set for an AI task (`phoenix_kit_ai_task_settings`, this
module's migration chain): one row per task key. Written through
`PhoenixKitAI.TaskLimits`, which checks the `ai.manage` permission.

`limits` is `%{"task" => %{unit => %{period => amount}}, "user" => …}`:
the task's own limits and the default for each user in it (see
`PhoenixKitAI.TaskLimits`). `warn_percent` is nil for the default (80).
`guard_mode` (`off` / `self_flag`, set with
`PhoenixKitAI.TaskLimits.set_guard_mode/3`) overrides the declaration's
`self_flag`; the classifier fields are for a later part of the guard.

# `t`

```elixir
@type t() :: %PhoenixKitAI.TaskSetting{
  __meta__: term(),
  auto_block_threshold: term(),
  classifier_endpoint_uuid: term(),
  classifier_sample_percent: term(),
  guard_mode: term(),
  inserted_at: term(),
  limits: term(),
  purpose_override: term(),
  task_key: term(),
  updated_at: term(),
  updated_by_uuid: term(),
  uuid: term(),
  warn_percent: term()
}
```

---

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