mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-22 16:48:57 +00:00
refactor, full run
This commit is contained in:
parent
de9dfff221
commit
1ee67de035
12 changed files with 1039 additions and 1127 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue