Class: Roseflow::OpenRouter::Provider

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

Instance Method Summary collapse

Constructor Details

#initialize(config = Roseflow::OpenRouter::Config.new) ⇒ Provider

Returns a new instance of Provider.



10
11
12
# File 'lib/roseflow/open_router/provider.rb', line 10

def initialize(config = Roseflow::OpenRouter::Config.new)
  @config = config
end

Instance Method Details

#clientObject



14
15
16
# File 'lib/roseflow/open_router/provider.rb', line 14

def client
  @client ||= Client.new(config, self)
end

#completion(model:, prompt:, **options) ⇒ Object

Raises:



22
23
24
# File 'lib/roseflow/open_router/provider.rb', line 22

def completion(model:, prompt:, **options)
  raise DeprecationError, "This method is deprecated. Please use Model operations instead."
end

#modelsObject



18
19
20
# File 'lib/roseflow/open_router/provider.rb', line 18

def models
  @models ||= ModelRepository.new(self)
end