Module: RubyLLM::Providers::Azure::Embeddings

Included in:
RubyLLM::Providers::Azure
Defined in:
lib/ruby_llm/providers/azure/embeddings.rb

Overview

Embeddings methods of the Azure AI Foundry API integration

Class Method Summary collapse

Class Method Details

.embedding_urlObject



10
11
12
# File 'lib/ruby_llm/providers/azure/embeddings.rb', line 10

def embedding_url(...)
  'openai/v1/embeddings'
end

.render_embedding_payload(text, model:, dimensions:) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/ruby_llm/providers/azure/embeddings.rb', line 14

def render_embedding_payload(text, model:, dimensions:)
  {
    model: model,
    input: [text].flatten,
    dimensions: dimensions
  }.compact
end