Skip to content

Commit

Permalink
bugfix: Handle BYO Embeddings (#4387)
Browse files Browse the repository at this point in the history
  • Loading branch information
erichare committed Nov 5, 2024
1 parent f6616f5 commit ba1d737
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/base/langflow/components/vectorstores/astradb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ba1d737

Please sign in to comment.