Class: Anthropic::Models::ContainerSkill

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/container_skill.rb,
sig/anthropic/models/container_skill.rbs

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(skill_id:, type:, version:) ⇒ ContainerSkill

A skill that was loaded in a container (response model).

Parameters:

  • skill_id (String) —

    Skill ID

  • type (Symbol, Anthropic::Models::ContainerSkill::Type) —

    Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

  • version (String) —

    The resolved version: a skill version ID for custom skills.

  • skill_id: (String)
  • type: (Anthropic::Models::ContainerSkill::type_)
  • version: (String)


# File 'lib/anthropic/models/container_skill.rb', line 24

Instance Attribute Details

#skill_id ⇒ String

Skill ID

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/anthropic/models/container_skill.rb', line 10

required :skill_id, String

#type ⇒ Symbol, Anthropic::Models::ContainerSkill::Type

Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

Parameters:

  • value (Anthropic::Models::ContainerSkill::type_)

Returns:



16
# File 'lib/anthropic/models/container_skill.rb', line 16

required :type, enum: -> { Anthropic::ContainerSkill::Type }

#version ⇒ String

The resolved version: a skill version ID for custom skills.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/anthropic/models/container_skill.rb', line 22

required :version, String

Instance Method Details

#to_hash ⇒ { skill_id: String, type: Anthropic::Models::ContainerSkill::type_, version: String }

Returns:

  • ({ skill_id: String, type: Anthropic::Models::ContainerSkill::type_, version: String })


23
24
25
26
27
# File 'sig/anthropic/models/container_skill.rbs', line 23

def to_hash: -> {
  skill_id: String,
  type: Anthropic::Models::ContainerSkill::type_,
  version: String
}