mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 06:18:05 +00:00
docs[patch]: Improve env variable handling in documentation notebooks (#26347)
Updated using gritql ``` `os.environ[$key] = getpass($msg)` as $M where { $M <: ! within if_statement(), $M => `if $key not in os.environ: $M` } ```
This commit is contained in:
@@ -90,7 +90,8 @@
|
||||
"import os\n",
|
||||
"from getpass import getpass\n",
|
||||
"\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = getpass()\n",
|
||||
"if \"OPENAI_API_KEY\" not in os.environ:\n",
|
||||
" os.environ[\"OPENAI_API_KEY\"] = getpass()\n",
|
||||
"# Please manually enter OpenAI Key"
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user