ACPex.Schema.Types.ContentBlock.ResourceLink (ACPex v0.1.1)

Copy Markdown View Source

Resource link content block.

Represents a reference to an external resource in a prompt or message.

Required Fields

  • type - Always "resource_link" for this variant
  • uri - URI of the resource
  • name - Name of the resource

Optional Fields

  • description - Description of the resource
  • mime_type - MIME type of the resource
  • size - Size of the resource in bytes
  • title - Title of the resource
  • annotations - Additional annotations (map)
  • meta - Additional metadata (map)

Example

%ACPex.Schema.Types.ContentBlock.ResourceLink{
  type: "resource_link",
  uri: "file:///home/user/document.pdf",
  name: "document.pdf",
  title: "Important Document",
  description: "A PDF containing important information",
  mime_type: "application/pdf",
  size: 1024000
}

JSON Representation

{
  "type": "resource_link",
  "uri": "file:///home/user/document.pdf",
  "name": "document.pdf",
  "title": "Important Document",
  "description": "A PDF containing important information",
  "mimeType": "application/pdf",
  "size": 1024000
}

Summary

Functions

Creates a changeset for validation.

Types

t()

@type t() :: %ACPex.Schema.Types.ContentBlock.ResourceLink{
  annotations: map() | nil,
  description: String.t() | nil,
  meta: map() | nil,
  mime_type: String.t() | nil,
  name: String.t(),
  size: integer() | nil,
  title: String.t() | nil,
  type: String.t(),
  uri: String.t()
}

Functions

changeset(struct \\ %__MODULE__{}, params)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for validation.

Required Fields

  • uri - Must be present
  • name - Must be present

The type field defaults to "resource_link".