fix: support Astra Enhanced flag in new component (#5056)

* fix: support Astra Enhanced flag in new component

* Fiz env variable used for dynamic display
This commit is contained in:
Eric Hare 2024-12-04 07:55:57 -08:00 committed by GitHub
commit 10475693e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,8 +104,8 @@ class AstraDBVectorStoreComponent(LCVectorStoreComponent):
name="collection_name_new",
display_name="Collection Name",
info="Name of the new collection to create.",
advanced=False,
required=True,
advanced=os.getenv("LANGFLOW_HOST") is not None,
required=os.getenv("LANGFLOW_HOST") is None,
),
StrInput(
name="keyspace",
@ -643,7 +643,7 @@ class AstraDBVectorStoreComponent(LCVectorStoreComponent):
# Get Langflow version and platform information
__version__ = get_version_info()["version"]
langflow_prefix = ""
if os.getenv("ASTRA_ENHANCED", "false").lower() == "true":
if os.getenv("LANGFLOW_HOST") is not None:
langflow_prefix = "ds-"
try: