Sha256: 3a86695a5a9f88db5744e4c59c26929b737afdc7886461b455768487c138596a

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'bedrock_runtime/payload_builders/ai_21_labs/base'

RSpec.describe RubyAmazonBedrock::PayloadBuilders::Ai21Labs::Base do
  let(:prompt) { 'example_prompt' }
  let(:options) { {} }
  let(:body) do
    {
      prompt: prompt,
      maxTokenCount: 200,
      temperature: 0,
      topP: 1,
      stopSequences: [],
      countPenalty: { scale: 0 },
      presencePenalty: { scale: 0 },
      frequencyPenalty: { scale: 0 }
    }.to_json
  end

  describe '#build' do
    it_should_behave_like 'a payload builder'

    context 'with custom parameters' do
      include_context 'a121 labs parameters'
      it_should_behave_like 'a payload builder'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-amazon-bedrock-0.2.2 spec/bedrock_runtime/payload_builders/ai_21_labs/base_spec.rb