Method: ActiveAI::Router#behavior
- Defined in:
- lib/activeai/router.rb
#behavior ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/activeai/router.rb', line 26 def behavior raw_examples = [UNMATCHED] + @routings.map do |routing| routing['examples'].reject do |example| example['Route'] == 'None' end.map do |example| example.slice('Match', 'Route') end end.flatten examples = ActiveAI.route_examples_to_function_call_examples(raw_examples) ActiveAI::Behavior::LLM::WriteFunctionCall.new(@llm, { examples: examples }) end |