From ba1d73789f866c8e7d0ce5fd71afed4a7cd7b9d7 Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Tue, 5 Nov 2024 08:51:01 -0800 Subject: [PATCH] bugfix: Handle BYO Embeddings (#4387) --- src/backend/base/langflow/components/vectorstores/astradb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/vectorstores/astradb.py b/src/backend/base/langflow/components/vectorstores/astradb.py index 3f44c3587b8b..70ed5072d981 100644 --- a/src/backend/base/langflow/components/vectorstores/astradb.py +++ b/src/backend/base/langflow/components/vectorstores/astradb.py @@ -290,6 +290,8 @@ def update_build_config(self, build_config: dict, field_value: str, field_name: "https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html):\n\n" f"{', '.join(model_options)}", options=model_options, + placeholder="Select a model", + value=model_options[0], required=True, ).to_dict() @@ -403,8 +405,8 @@ def build_vector_store(self, vectorize_options=None): "collection_vector_service_options": CollectionVectorServiceOptions.from_dict( dict_options.get("collection_vector_service_options", {}) ), + "collection_embedding_api_key": dict_options.get("collection_embedding_api_key"), } - try: vector_store = AstraDBVectorStore( collection_name=self.collection_name,