Skip to content

Commit

Permalink
fix: vectorize authentication params (#3954)
Browse files Browse the repository at this point in the history
Fix vectorize authentication params
  • Loading branch information
jordanrfrazier authored Sep 27, 2024
1 parent e181624 commit 059fd94
Showing 1 changed file with 2 additions and 4 deletions.
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 @@ -339,9 +339,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 @@ -353,7 +351,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

0 comments on commit 059fd94

Please sign in to comment.