Class: ClaudeAgentSDK::AssistantMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Assistant message with content blocks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, model:, parent_tool_use_id: nil, error: nil) ⇒ AssistantMessage

Returns a new instance of AssistantMessage.



98
99
100
101
102
103
# File 'lib/claude_agent_sdk/types.rb', line 98

def initialize(content:, model:, parent_tool_use_id: nil, error: nil)
  @content = content
  @model = model
  @parent_tool_use_id = parent_tool_use_id
  @error = error # One of: authentication_failed, billing_error, rate_limit, invalid_request, server_error, unknown
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



96
97
98
# File 'lib/claude_agent_sdk/types.rb', line 96

def content
  @content
end

#errorObject

Returns the value of attribute error.



96
97
98
# File 'lib/claude_agent_sdk/types.rb', line 96

def error
  @error
end

#modelObject

Returns the value of attribute model.



96
97
98
# File 'lib/claude_agent_sdk/types.rb', line 96

def model
  @model
end

#parent_tool_use_idObject

Returns the value of attribute parent_tool_use_id.



96
97
98
# File 'lib/claude_agent_sdk/types.rb', line 96

def parent_tool_use_id
  @parent_tool_use_id
end