Class: RubyLLM::BedrockInvoke::RawContent

Inherits:
Content::Raw
  • Object
show all
Defined in:
lib/ruby_llm/bedrock_invoke/raw_content.rb

Overview

Raw Anthropic content blocks that must be replayed verbatim on subsequent requests (server_tool_use / tool_search_tool_result and their siblings), while still displaying as the assistant's text.

RubyLLM renders RubyLLM::Content::Raw message content into the payload unchanged, which is exactly what the tool search tool requires: its server-side blocks are passed back untouched and expanded by the API.

Instance Method Summary collapse

Constructor Details

#initialize(value, text: nil) ⇒ RawContent

Returns a new instance of RawContent.



13
14
15
16
# File 'lib/ruby_llm/bedrock_invoke/raw_content.rb', line 13

def initialize(value, text: nil)
  super(value)
  @text = text
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/ruby_llm/bedrock_invoke/raw_content.rb', line 18

def to_s
  @text.to_s
end