Class: LLM::A2A::Card::Capabilities
- Inherits:
-
Object
- Object
- LLM::A2A::Card::Capabilities
- Defined in:
- lib/llm/a2a/card/capabilities.rb
Overview
Represents the agent's optional capabilities.
Instance Method Summary collapse
-
#initialize(data) ⇒ Capabilities
constructor
A new instance of Capabilities.
-
#streaming ⇒ Boolean
Returns whether the agent supports streaming.
-
#push_notifications ⇒ Boolean
Returns whether the agent supports push notifications.
-
#extended_agent_card ⇒ Boolean
Returns whether the agent exposes an extended card.
-
#extensions ⇒ Array<LLM::Object>
Returns the declared agent extensions.
Constructor Details
#initialize(data) ⇒ Capabilities
Returns a new instance of Capabilities.
9 10 11 |
# File 'lib/llm/a2a/card/capabilities.rb', line 9 def initialize(data) @data = LLM::Object.from(data) end |
Instance Method Details
#streaming ⇒ Boolean
Returns whether the agent supports streaming.
16 17 18 |
# File 'lib/llm/a2a/card/capabilities.rb', line 16 def streaming @data.streaming == true end |
#push_notifications ⇒ Boolean
Returns whether the agent supports push notifications.
23 24 25 |
# File 'lib/llm/a2a/card/capabilities.rb', line 23 def push_notifications @data.pushNotifications == true end |
#extended_agent_card ⇒ Boolean
Returns whether the agent exposes an extended card.
30 31 32 |
# File 'lib/llm/a2a/card/capabilities.rb', line 30 def extended_agent_card @data.extendedAgentCard == true end |
#extensions ⇒ Array<LLM::Object>
Returns the declared agent extensions.
37 38 39 |
# File 'lib/llm/a2a/card/capabilities.rb', line 37 def extensions @extensions ||= (@data.extensions || []).map { LLM::Object.from(_1) } end |