mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-28 23:07:11 +00:00
Check whether the API key is already in the environment Update: ```python import getpass import os os.environ["DATABRICKS_HOST"] = "https://your-workspace.cloud.databricks.com" os.environ["DATABRICKS_TOKEN"] = getpass.getpass("Enter your Databricks access token: ") ``` To: ```python import getpass import os os.environ["DATABRICKS_HOST"] = "https://your-workspace.cloud.databricks.com" if "DATABRICKS_TOKEN" not in os.environ: os.environ["DATABRICKS_TOKEN"] = getpass.getpass( "Enter your Databricks access token: " ) ``` grit migration: ``` engine marzano(0.1) language python `os.environ[$Q] = getpass.getpass("$X")` as $CHECK where { $CHECK <: ! within if_statement(), $CHECK => `if $Q not in os.environ:\n $CHECK` } ```
LangChain Documentation
For more information on contributing to our documentation, see the Documentation Contributing Guide