Add Bedrock as new embedder backend with test and example #17
Add Bedrock as new embedder backend with test and example #17mehmetymw wants to merge 1 commit intoStacklokLabs:mainfrom
Conversation
|
Hi, while adding Bedrock support, I also considered persisting the embeddings to the database. I created a new table called bedrock_embeddings_1024 in init.sql. However, I noticed that the current implementation of SaveEmbeddings only routes inserts based on vector length, not model name. This could lead to confusion or data collisions if multiple providers (e.g., Ollama and Bedrock) produce embeddings of the same dimension (e.g., 1024). To avoid polluting the current logic, I didn’t modify it yet, but I’d suggest refactoring SaveEmbeddings to route based on metadata["model"] instead of (or in addition to) the embedding length. This would allow more reliable separation of embeddings across different models. Alternatively, using a single embeddings table with additional columns like model_name, dim, and created_at might be a more scalable and normalized approach. Let me know what you think—happy to update the code accordingly if this direction makes sense. |
No description provided.