Class: ClaudeCodeSDK::AssistantMessage
- Defined in:
- lib/claude_code_sdk/messages.rb
Overview
Assistant response message
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#thinking ⇒ Object
readonly
Returns the value of attribute thinking.
Attributes inherited from Message
Instance Method Summary collapse
-
#initialize(id:, content:, thinking: nil) ⇒ AssistantMessage
constructor
A new instance of AssistantMessage.
Constructor Details
#initialize(id:, content:, thinking: nil) ⇒ AssistantMessage
Returns a new instance of AssistantMessage.
28 29 30 31 32 |
# File 'lib/claude_code_sdk/messages.rb', line 28 def initialize(id:, content:, thinking: nil) super(id: id, type: "assistant") @content = content # Array of content blocks @thinking = thinking # Optional thinking content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
26 27 28 |
# File 'lib/claude_code_sdk/messages.rb', line 26 def content @content end |
#thinking ⇒ Object (readonly)
Returns the value of attribute thinking.
26 27 28 |
# File 'lib/claude_code_sdk/messages.rb', line 26 def thinking @thinking end |