Skip to content

Commit 9ee2a63

Browse files
committed
Remove unused parse_embedding_response from Bedrock embeddings
Bedrock overrides embed at the provider level (it needs per-request SigV4 signing and cannot batch, so it issues one InvokeModel request per text and parses the responses inline). That means the base parse_embedding_response hook is never called, leaving it as dead code. Drop it; embedding_url and render_embedding_payload remain and are used.
1 parent 99d21f4 commit 9ee2a63

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

lib/ruby_llm/providers/bedrock/embeddings.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ def render_embedding_payload(text, model:, dimensions:) # rubocop:disable Lint/U
1717
payload[:normalize] = true
1818
payload
1919
end
20-
21-
def parse_embedding_response(response, model:, text:) # rubocop:disable Lint/UnusedMethodArgument
22-
data = response.body
23-
vectors = data['embedding']
24-
input_tokens = data['inputTextTokenCount'] || 0
25-
26-
Embedding.new(vectors:, model:, input_tokens:)
27-
end
2820
end
2921
end
3022
end

0 commit comments

Comments
 (0)