Class: Cadenya::Models::ToolCalled

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

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(arguments: nil, config: nil, tool: nil, tool_call_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::ToolCalled for more details.

Parameters:

  • arguments (Hash{Symbol=>Object}) (defaults to: nil)

    The arguments passed to the tool.

  • config (Cadenya::Models::ToolSets::ToolSpecConfig) (defaults to: nil)

    Config defines the adapter to use for the tool.

  • tool (Cadenya::Models::CallableTool) (defaults to: nil)

    CallableTool is a union that represents a tool that can be called by an agent. I

  • tool_call_id (String) (defaults to: nil)

    The ID of the objective tool call record that was executed.



# File 'lib/cadenya/models/tool_called.rb', line 35

Instance Attribute Details

#argumentsHash{Symbol=>Object}?

The arguments passed to the tool.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


10
# File 'lib/cadenya/models/tool_called.rb', line 10

optional :arguments, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]

#configCadenya::Models::ToolSets::ToolSpecConfig?

Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline.



18
# File 'lib/cadenya/models/tool_called.rb', line 18

optional :config, -> { Cadenya::ToolSets::ToolSpecConfig }

#toolCadenya::Models::CallableTool?

CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).



27
# File 'lib/cadenya/models/tool_called.rb', line 27

optional :tool, -> { Cadenya::CallableTool }

#tool_call_idString?

The ID of the objective tool call record that was executed.

Parameters:

  • (String)

Returns:

  • (String, nil)


33
# File 'lib/cadenya/models/tool_called.rb', line 33

optional :tool_call_id, String, api_name: :toolCallId

Instance Method Details

#to_hash{

Returns:

  • ({)


37
# File 'sig/cadenya/models/tool_called.rbs', line 37

def to_hash: -> {