Class: LLM::A2A::Card::Skill

Inherits:
Object
  • Object
show all
Defined in:
lib/llm/a2a/card/skill.rb

Overview

Represents a single skill/capability of an agent.

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Skill

Returns a new instance of Skill.

Parameters:

  • data (Hash)


9
10
11
# File 'lib/llm/a2a/card/skill.rb', line 9

def initialize(data)
  @data = LLM::Object.from(data)
end

Instance Method Details

#inspectString

Returns:

  • (String)


64
65
66
# File 'lib/llm/a2a/card/skill.rb', line 64

def inspect
  "#<#{LLM::Utils.object_id(self)} @id=#{id.inspect} @name=#{name.inspect}>"
end

#idString

Returns the unique identifier for the skill.

Returns:

  • (String)


16
17
18
# File 'lib/llm/a2a/card/skill.rb', line 16

def id
  @data.id
end

#nameString

Returns the human-readable skill name.

Returns:

  • (String)


23
24
25
# File 'lib/llm/a2a/card/skill.rb', line 23

def name
  @data.name
end

#descriptionString

Returns the detailed skill description.

Returns:

  • (String)


30
31
32
# File 'lib/llm/a2a/card/skill.rb', line 30

def description
  @data.description
end

#tagsArray<String>

Returns capability tags for the skill.

Returns:

  • (Array<String>)


37
38
39
# File 'lib/llm/a2a/card/skill.rb', line 37

def tags
  @data.tags || []
end

#examplesArray<String>

Returns example prompts for the skill.

Returns:

  • (Array<String>)


44
45
46
# File 'lib/llm/a2a/card/skill.rb', line 44

def examples
  @data.examples || []
end

#input_modesArray<String>

Returns the supported input media types.

Returns:

  • (Array<String>)


51
52
53
# File 'lib/llm/a2a/card/skill.rb', line 51

def input_modes
  @data.inputModes || @data.input_modes || []
end

#output_modesArray<String>

Returns the supported output media types.

Returns:

  • (Array<String>)


58
59
60
# File 'lib/llm/a2a/card/skill.rb', line 58

def output_modes
  @data.outputModes || @data.output_modes || []
end