Gemini.Types.Content (GeminiEx v0.0.1)

View Source

Content type for Gemini API requests and responses.

Summary

Types

Ordered parts that constitute a single message.

The role of the content creator.

t()

Functions

Create content with an image from a file path.

Create content with text and image.

Create content with text.

Types

parts()

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

Ordered parts that constitute a single message.

role()

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

The role of the content creator.

t()

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

Functions

image(path, role \\ "user")

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

Create content with an image from a file path.

multimodal(text, image_data, mime_type, role \\ "user")

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

Create content with text and image.

text(text, role \\ "user")

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

Create content with text.