Class: Roseflow::Text::Completion

Inherits:
Object
  • Object
show all
Defined in:
lib/roseflow/text/completion.rb

Instance Method Summary collapse

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:, **options)
  provider.completions(model: model, prompt: @input, **options).choices
end