MCPcopy Create free account
hub / github.com/Bairong-Xdynamics/MistakeNotebookLearning / get_env_or_raise

Function get_env_or_raise

examples/example_dbqa.py:42–47  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

40load_dotenv()
41
42def get_env_or_raise(key):
43 value = os.getenv(key)
44 if not value:
45 logging.warning(f"Environment variable {key} is missing in .env")
46 return ""
47 return value
48
49# Tuning model configuration
50TUNING_BASE_URLS = get_env_or_raise("TUNING_BASE_URLS").split(",")

Callers 1

example_dbqa.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected