From 9d4d41c5f54dc9779df6a5a323c8c5ac4a6797bd Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Tue, 5 Nov 2024 11:32:25 -0800 Subject: [PATCH] fix: Handle BYO Embeddings (#4387) (#4410) 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 3f44c3587..70ed5072d 100644 --- a/src/backend/base/langflow/components/vectorstores/astradb.py +++ b/src/backend/base/langflow/components/vectorstores/astradb.py @@ -290,6 +290,8 @@ class AstraVectorStoreComponent(LCVectorStoreComponent): "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 @@ class AstraVectorStoreComponent(LCVectorStoreComponent): "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,