repository_reader / config /llm_settings.py
DeL-TaiseiOzaki
ss
01d6d0e
raw
history blame
631 Bytes
import os
from dotenv import load_dotenv
class LLMSettings:
def __init__(self):
load_dotenv()
self.anthropic_api_key = os.getenv("ANTHROPIC_API_KEY")
self.openai_api_key = os.getenv("OPENAI_API_KEY")
self.default_llm = "claude"
def get_available_models(self):
available_models = []
if self.anthropic_api_key:
available_models.append("claude")
if self.openai_api_key:
available_models.append("openai")
if not available_models:
raise ValueError("APIキーが設定されていません")
return available_models