Class: Smith::Models::ToolRouting

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/smith/models/tool_routing.rb

Instance Method Summary collapse

Instance Method Details

#callObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/smith/models/tool_routing.rb', line 18

def call
  return unless chat.respond_to?(:tools)

  tools = chat.tools.values
  return if tools.empty?

  route_tools_with_thinking if thinking_active?
  route_tools_for_compatibility(tools)
  drop_incompatible_tools(tools)
end