Sha256: 9c887cdf2573f3797df0cbc8f1355eae17458a1a567cee6027964949e7bca02e
Contents?: true
Size: 779 Bytes
Versions: 3
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' require 'bedrock_runtime/payload_builders/cohere/embed_english_v3' RSpec.describe RubyAmazonBedrock::PayloadBuilders::Cohere::EmbedEnglishV3 do let(:input) { 'example_input' } let(:options) { { key: 'value' } } let(:body) do { texts: [input], input_type: 'search_document' }.to_json end describe '#build' do it 'returns a hash with the expected structure' do payload_builder = described_class.new(input, options) payload = payload_builder.build expect(payload[:model_id]).to eq('cohere.embed-english-v3') expect(payload[:content_type]).to eq('application/json') expect(payload[:accept]).to eq('*/*') expect(payload[:body]).to eq(body) end end end
Version data entries
3 entries across 3 versions & 1 rubygems