refactor, full run

This commit is contained in:
based-tachikoma 2025-05-20 20:11:52 -07:00
parent de9dfff221
commit 1ee67de035
12 changed files with 1039 additions and 1127 deletions

View file

@ -1,5 +1,3 @@
"""API utility functions for the protein design environment."""
import os
import logging
import yaml
@ -7,15 +5,13 @@ 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
"""
@ -24,5 +20,5 @@ def load_api_key() -> Optional[str]:
logger.error("NVIDIA_NIM_API_KEY not found in environment variables. "
"Please set it in your .env file.")
return None
return api_key
return api_key