Class: Roseflow::OpenRouter::OperationHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/roseflow/open_router/operation_handler.rb

Constant Summary collapse

OPERATION_CLASSES =
{
  completion: Operations::Completion,
}

Instance Method Summary collapse

Constructor Details

#initialize(operation, options = {}) ⇒ OperationHandler

Returns a new instance of OperationHandler.



12
13
14
15
# File 'lib/roseflow/open_router/operation_handler.rb', line 12

def initialize(operation, options = {})
  @operation = operation
  @options = options
end

Instance Method Details

#callObject



17
18
19
# File 'lib/roseflow/open_router/operation_handler.rb', line 17

def call
  operation_class.new(@options)
end