Class: Roseflow::Text::Completion
- Inherits:
-
Object
- Object
- Roseflow::Text::Completion
- Defined in:
- lib/roseflow/text/completion.rb
Instance Method Summary collapse
-
#call(model:, prompt:, **options) ⇒ Object
Creates a new completion for the given input.
-
#initialize(input) ⇒ Completion
constructor
A new instance of Completion.
Constructor Details
#initialize(input) ⇒ Completion
Returns a new instance of Completion.
6 7 8 |
# File 'lib/roseflow/text/completion.rb', line 6 def initialize(input) @input = input end |
Instance Method Details
#call(model:, prompt:, **options) ⇒ Object
Creates a new completion for the given input.
11 12 13 |
# File 'lib/roseflow/text/completion.rb', line 11 def call(model:, prompt:, **) provider.completions(model: model, prompt: @input, **).choices end |