From a1f1067f69c9e7d58bf7478225c71cc00e887f77 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Tue, 27 Feb 2024 18:52:53 -0300 Subject: [PATCH] FIX: Lower truncation size for Gemini Embeddings (#493) --- lib/embeddings/vector_representations/gemini.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/embeddings/vector_representations/gemini.rb b/lib/embeddings/vector_representations/gemini.rb index 529f5ac4..0762432f 100644 --- a/lib/embeddings/vector_representations/gemini.rb +++ b/lib/embeddings/vector_representations/gemini.rb @@ -31,7 +31,7 @@ module DiscourseAi end def max_sequence_length - 2048 + 1536 # Gemini has a max sequence length of 2048, but the API has a limit of 10000 bytes, hence the lower value end def pg_function