# `Gemini.Types.Content`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L1)

Content type for Gemini API requests and responses.

# `parts`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L20)

```elixir
@type parts() :: [Gemini.Types.Part.t()]
```

Ordered parts that constitute a single message.

# `role`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L17)

```elixir
@type role() :: String.t()
```

The role of the content creator.

# `t`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L11)

```elixir
@type t() :: %Gemini.Types.Content{parts: [Gemini.Types.Part.t()], role: String.t()}
```

# `from_tool_results`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L81)

```elixir
@spec from_tool_results([Altar.ADM.ToolResult.t()]) :: t()
```

Create content from tool results for function response.

Takes a list of validated ToolResult structs and transforms them into
a single Content struct with role "tool" containing functionResponse parts.

## Parameters
  - `results` - List of Altar.ADM.ToolResult.t() structs

## Returns
  - Content struct with role "tool" and functionResponse parts

## Examples

    iex> results = [%Altar.ADM.ToolResult{call_id: "call_123", content: "result"}]
    iex> Gemini.Types.Content.from_tool_results(results)
    %Gemini.Types.Content{
      role: "tool",
      parts: [%{functionResponse: %{name: "call_123", response: %{content: "result"}}}]
    }

# `image`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L51)

```elixir
@spec image(String.t(), String.t()) :: t()
```

Create content with an image from a file path.

# `multimodal`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L37)

```elixir
@spec multimodal(String.t(), String.t(), String.t(), String.t()) :: t()
```

Create content with text and image.

# `text`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.13.0/lib/gemini/types/common/content.ex#L26)

```elixir
@spec text(String.t(), String.t()) :: t()
```

Create content with text.

---

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