struct
ACP::Protocol::ResourceLinkContentBlock
- ACP::Protocol::ResourceLinkContentBlock
- ACP::Protocol::ContentBlock
- Struct
- Value
- Object
Overview
References to resources that the Agent can access. All Agents MUST support resource links in prompts.
See: https://agentclientprotocol.com/protocol/content#resource-link
Included Modules
- JSON::Serializable
Defined in:
acp/protocol/content_block.crConstructors
-
.from_path(path : String, mime_type : String | Nil = nil) : ResourceLinkContentBlock
Creates a resource link from an absolute file path.
- .new(uri : String, name : String, mime_type : String | Nil = nil, title : String | Nil = nil, description : String | Nil = nil, size : Int64 | Nil = nil, annotations : Annotations | Nil = nil, meta : Hash(String, JSON::Any) | Nil = nil)
-
.new(pull : JSON::PullParser)
References to resources that the Agent can access.
Instance Method Summary
-
#annotations : Annotations | Nil
Optional metadata about how the content should be used or displayed.
-
#annotations=(annotations : Annotations | Nil)
Optional metadata about how the content should be used or displayed.
-
#description : String | Nil
Optional description of the resource contents.
-
#description=(description : String | Nil)
Optional description of the resource contents.
-
#meta : Hash(String, JSON::Any) | Nil
Extension metadata.
-
#meta=(meta : Hash(String, JSON::Any) | Nil)
Extension metadata.
-
#mime_type : String | Nil
The MIME type of the resource.
-
#mime_type=(mime_type : String | Nil)
The MIME type of the resource.
-
#name : String
A human-readable name for the resource (required).
-
#name=(name : String)
A human-readable name for the resource (required).
-
#path : String | Nil
Helper to extract the file path from a file:// URI.
-
#size : Int64 | Nil
Optional size of the resource in bytes.
-
#size=(size : Int64 | Nil)
Optional size of the resource in bytes.
-
#title : String | Nil
Optional display title for the resource.
-
#title=(title : String | Nil)
Optional display title for the resource.
-
#type : String
Always "resource_link" for this block type.
-
#uri : String
The URI of the resource (required).
-
#uri=(uri : String)
The URI of the resource (required).
Instance methods inherited from struct ACP::Protocol::ContentBlock
type : String
type
Constructor methods inherited from struct ACP::Protocol::ContentBlock
new(pull : JSON::PullParser)
new
Constructor Detail
Creates a resource link from an absolute file path.
References to resources that the Agent can access. All Agents MUST support resource links in prompts.
See: https://agentclientprotocol.com/protocol/content#resource-link
Instance Method Detail
Optional metadata about how the content should be used or displayed.
Optional metadata about how the content should be used or displayed.