# `LlmCall.Content`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/content.ex#L79)

Canonical content parts.

A content part is one item of a message or response body. Tool calls and tool
results are parts, not a separate message role, because providers disagree on
how they are carried.

# `part`

```elixir
@type part() ::
  %LlmCall.Content.Text{text: String.t()}
  | %LlmCall.Content.Image{media_type: String.t() | nil, source: source()}
  | %LlmCall.Content.File{
      filename: String.t() | nil,
      media_type: String.t() | nil,
      source: source()
    }
  | %LlmCall.Content.Video{media_type: String.t() | nil, source: source()}
  | %LlmCall.ToolCall{
      arguments: term(),
      arguments_error: term(),
      id: term(),
      index: term(),
      name: term(),
      raw_arguments: term()
    }
  | %LlmCall.ToolResult{
      call_id: term(),
      content: term(),
      is_error: term(),
      name: term()
    }
  | %LlmCall.Content.Thinking{signature: String.t() | nil, text: String.t()}
  | %LlmCall.Content.Raw{data: map(), type: String.t() | nil}
```

# `source`

```elixir
@type source() ::
  String.t()
  | {:url, String.t()}
  | {:base64, String.t()}
  | {:file_id, String.t()}
```

---

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