Skip to content

Commit

Permalink
Completion method to OpenRouter adapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljuti committed Aug 3, 2023
1 parent a278995 commit e5770f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/roseflow/ai/models/openrouter_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def call(operation, options, &block)
def chat(options, &block)
@model.chat(options.delete(:messages), options, &block)
end

def completion(options, &block)
@model.completion(options, &block)
end
end
end
end
Expand Down
1 change: 0 additions & 1 deletion lib/roseflow/embeddings/embedding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def initialize(**kwargs)
def call
raise ArgumentError, "An input must be provided" unless @input
raise EmbeddingModelNotSpecifiedError, "An embedding model must be specified" unless @model
# response = @model.call(:embedding, model: @model.name, input: @input)
response = @model.embed(input: @input)
embedding = response.embedding
@vector = Primitives::Vector.new(values: embedding.vector, dimensions: embedding.length)
Expand Down

0 comments on commit e5770f7

Please sign in to comment.