A2A.FileContent (A2A v0.2.0)

Copy Markdown View Source

Represents file content with either inline bytes or a URI reference.

At least one of bytes or uri must be provided.

Summary

Functions

Creates a new FileContent with inline bytes.

Creates a new FileContent with a URI reference.

Types

t()

@type t() :: %A2A.FileContent{
  bytes: binary() | nil,
  mime_type: String.t() | nil,
  name: String.t() | nil,
  uri: String.t() | nil
}

Functions

from_bytes(bytes, opts \\ [])

@spec from_bytes(
  binary(),
  keyword()
) :: t()

Creates a new FileContent with inline bytes.

from_uri(uri, opts \\ [])

@spec from_uri(
  String.t(),
  keyword()
) :: t()

Creates a new FileContent with a URI reference.