INNER CODE UNIT · Python

load_env_variables

mrwadams/stride-gpt · apps/web/main.py:862

def load_env_variables():
    # Try to load from .env file
    if Path(".env").exists():
        load_dotenv(".env")

    # Load GitHub API key from environment variable
    github_api_key = os.getenv("GITHUB_API_KEY")
    if github_api_key:
        st.session_state["github_api_key"] = github_api_key

    # Load other API keys if needed
    openai_api_key = os.getenv("OPENAI_API_KEY")
    if openai_api_key:
        st.session_state["openai_api_key"] = openai_api_key

    anthropic_api_key = os.getenv("ANTHROPIC_API_KEY")
    if anthropic_api_key:
        st.session_state["anthropic_api_key"] = anthropic_api_key

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…