Class: RubyLLM::Protocols::InvokeModel::CohereEmbeddings
- Inherits:
-
InvokeModel
- Object
- InvokeModel
- RubyLLM::Protocols::InvokeModel::CohereEmbeddings
- Defined in:
- lib/ruby_llm/protocols/invoke_model/cohere_embeddings.rb
Overview
Cohere embedding models over Bedrock InvokeModel.
Instance Method Summary collapse
-
#embed(text, model:, dimensions:, task_type: nil, title: nil, with: nil, provider_options: {}) ⇒ Object
rubocop:disable-next Lint/UnusedMethodArgument.
Instance Method Details
#embed(text, model:, dimensions:, task_type: nil, title: nil, with: nil, provider_options: {}) ⇒ Object
rubocop:disable-next Lint/UnusedMethodArgument
9 10 11 12 13 14 15 16 17 |
# File 'lib/ruby_llm/protocols/invoke_model/cohere_embeddings.rb', line 9 def (text, model:, dimensions:, task_type: nil, title: nil, with: nil, provider_options: {}) (with) track_usage(:embedding) do payload = (text, model:, dimensions:, task_type:, provider_options:) response = signed_post((model:), payload) (response, model:, text:) end end |