Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: vectorize authentication params #3954

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/backend/base/langflow/components/vectorstores/AstraDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,7 @@ def build_vectorize_options(self, **kwargs):
authentication = {**(self.z_04_authentication or kwargs.get("z_04_authentication", {}))}

api_key_name = self.z_02_api_key_name or kwargs.get("z_02_api_key_name")
provider_key_name = self.z_03_provider_api_key or kwargs.get("z_03_provider_api_key")
if provider_key_name:
authentication["providerKey"] = provider_key_name
provider_key = self.z_03_provider_api_key or kwargs.get("z_03_provider_api_key")
if api_key_name:
authentication["providerKey"] = api_key_name

Expand All @@ -352,7 +350,7 @@ def build_vectorize_options(self, **kwargs):
"authentication": authentication,
"parameters": self.z_01_model_parameters or kwargs.get("z_01_model_parameters", {}),
},
"collection_embedding_api_key": self.z_03_provider_api_key or kwargs.get("z_03_provider_api_key"),
"collection_embedding_api_key": provider_key,
}

@check_cached_vector_store
Expand Down
Loading