From 203906be6510e4c3a44354ebd97ea6b8cc5345be Mon Sep 17 00:00:00 2001 From: Roman Rizzi Date: Mon, 18 Dec 2023 16:06:06 -0300 Subject: [PATCH] FIX: Bedrock was complaining input was too long (#365) --- lib/completions/endpoints/aws_bedrock.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/completions/endpoints/aws_bedrock.rb b/lib/completions/endpoints/aws_bedrock.rb index 84fe4f49..0e8cf68f 100644 --- a/lib/completions/endpoints/aws_bedrock.rb +++ b/lib/completions/endpoints/aws_bedrock.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "aws-sigv4" + module DiscourseAi module Completions module Endpoints @@ -12,7 +14,7 @@ module DiscourseAi end def default_options - { max_tokens_to_sample: 20_000 } + { max_tokens_to_sample: 2_000 } end def provider_id