Class: Roseflow::OpenRouter::Provider
- Inherits:
-
Object
- Object
- Roseflow::OpenRouter::Provider
- Defined in:
- lib/roseflow/open_router/provider.rb
Instance Method Summary collapse
- #client ⇒ Object
- #completion(model:, prompt:, **options) ⇒ Object
-
#initialize(config = Roseflow::OpenRouter::Config.new) ⇒ Provider
constructor
A new instance of Provider.
- #models ⇒ Object
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
#client ⇒ Object
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
22 23 24 |
# File 'lib/roseflow/open_router/provider.rb', line 22 def completion(model:, prompt:, **) raise DeprecationError, "This method is deprecated. Please use Model operations instead." end |
#models ⇒ Object
18 19 20 |
# File 'lib/roseflow/open_router/provider.rb', line 18 def models @models ||= ModelRepository.new(self) end |