Class: RubyLLM::Modes::Registration
- Inherits:
-
Data
- Object
- Data
- RubyLLM::Modes::Registration
- Defined in:
- lib/ruby_llm/modes/registration.rb
Overview
One mode declaration of a router, resolved. klass is the agent
class, name the registration name, description the routing
description, and condition the if: lambda or nil.
Router#modes returns the registrations available for a call, and a
classifier receives the same objects as modes:.
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition
11 12 13 |
# File 'lib/ruby_llm/modes/registration.rb', line 11 def condition @condition end |
#description ⇒ Object (readonly)
Returns the value of attribute description
11 12 13 |
# File 'lib/ruby_llm/modes/registration.rb', line 11 def description @description end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass
11 12 13 |
# File 'lib/ruby_llm/modes/registration.rb', line 11 def klass @klass end |
#name ⇒ Object (readonly)
Returns the value of attribute name
11 12 13 |
# File 'lib/ruby_llm/modes/registration.rb', line 11 def name @name end |
Instance Method Details
#available_on?(router) ⇒ Boolean
12 13 14 |
# File 'lib/ruby_llm/modes/registration.rb', line 12 def available_on?(router) condition.nil? || !!router.instance_exec(&condition) end |