mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
rfdiffusion fix
This commit is contained in:
parent
4d9bec44c6
commit
de9dfff221
8 changed files with 1253 additions and 104 deletions
28
environments/hack0/protein_design_env/utils/api_utils.py
Normal file
28
environments/hack0/protein_design_env/utils/api_utils.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"""API utility functions for the protein design environment."""
|
||||
|
||||
import os
|
||||
import logging
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def load_api_key() -> Optional[str]:
|
||||
"""
|
||||
Load the NVIDIA NIM API key from environment variables.
|
||||
|
||||
Returns:
|
||||
The API key from environment variables, or None if not found
|
||||
"""
|
||||
api_key = os.environ.get("NVIDIA_NIM_API_KEY")
|
||||
if not api_key:
|
||||
logger.error("NVIDIA_NIM_API_KEY not found in environment variables. "
|
||||
"Please set it in your .env file.")
|
||||
return None
|
||||
|
||||
return api_key
|
||||
Loading…
Add table
Add a link
Reference in a new issue