# `Gemini.Types.Tuning`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.15.0/lib/gemini/types/tuning.ex#L1)

Types for the Tunings API (fine-tuning/model tuning).

This module provides structs for tuning job configuration, status,
and response parsing for Google's model tuning API.

# `job_state`

```elixir
@type job_state() ::
  :job_state_unspecified
  | :job_state_queued
  | :job_state_pending
  | :job_state_running
  | :job_state_succeeded
  | :job_state_failed
  | :job_state_cancelling
  | :job_state_cancelled
  | :job_state_paused
  | :job_state_expired
```

# `from_api_response`

```elixir
@spec from_api_response(map()) :: Gemini.Types.Tuning.TuningJob.t()
```

Parses a tuning job from API response.

# `job_complete?`

```elixir
@spec job_complete?(Gemini.Types.Tuning.TuningJob.t()) :: boolean()
```

Checks if a tuning job has completed (terminal state).

# `job_failed?`

```elixir
@spec job_failed?(Gemini.Types.Tuning.TuningJob.t()) :: boolean()
```

Checks if a tuning job failed.

# `job_running?`

```elixir
@spec job_running?(Gemini.Types.Tuning.TuningJob.t()) :: boolean()
```

Checks if a tuning job is still running (non-terminal state).

# `job_succeeded?`

```elixir
@spec job_succeeded?(Gemini.Types.Tuning.TuningJob.t()) :: boolean()
```

Checks if a tuning job succeeded.

# `parse_state`

```elixir
@spec parse_state(String.t() | nil) :: job_state() | nil
```

Parses job state string to atom.

# `state_to_api`

```elixir
@spec state_to_api(job_state()) :: String.t()
```

Converts job state atom to API string.

# `to_api_map`

```elixir
@spec to_api_map(Gemini.Types.Tuning.CreateTuningJobConfig.t()) :: map()
```

Converts CreateTuningJobConfig to API request map.

---

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