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