fix: Use global var if available for api endpoint (#4909)
* fix: Use global var if available for api endpoint * Update astradb.py
This commit is contained in:
parent
7e7fe19f4f
commit
e38af369e5
1 changed files with 4 additions and 3 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
from typing import Any
|
||||
|
||||
from astrapy import Collection, DataAPIClient, Database
|
||||
|
|
@ -10,7 +11,7 @@ from langflow.schema import Data
|
|||
|
||||
|
||||
class AstraDBToolComponent(LCToolComponent):
|
||||
display_name: str = "Astra DB"
|
||||
display_name: str = "Astra DB Tool"
|
||||
description: str = "Create a tool to get transactional data from DataStax Astra DB Collection"
|
||||
documentation: str = "https://docs.langflow.org/Components/components-tools#astra-db-tool"
|
||||
icon: str = "AstraDB"
|
||||
|
|
@ -48,9 +49,9 @@ class AstraDBToolComponent(LCToolComponent):
|
|||
value="ASTRA_DB_APPLICATION_TOKEN",
|
||||
required=True,
|
||||
),
|
||||
StrInput(
|
||||
SecretStrInput(
|
||||
name="api_endpoint",
|
||||
display_name="API Endpoint",
|
||||
display_name="Database" if os.getenv("ASTRA_ENHANCED", "false").lower() == "true" else "API Endpoint",
|
||||
info="API endpoint URL for the Astra DB service.",
|
||||
value="ASTRA_DB_API_ENDPOINT",
|
||||
required=True,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue