Spaces:
Running
Running
File size: 871 Bytes
6a71f13 1e951c6 01d6d0e 1e951c6 01d6d0e 1e951c6 6a71f13 1e951c6 6a71f13 1e951c6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import os
from dotenv import load_dotenv
class LLMSettings:
def __init__(self):
load_dotenv()
# デバッグ用に表示
print("ANTHROPIC_API_KEY:", bool(os.getenv("ANTHROPIC_API_KEY")))
self.anthropic_api_key = os.getenv("ANTHROPIC_API_KEY")
self.openai_api_key = os.getenv("OPENAI_API_KEY")
self.default_llm = "claude"
# 利用可能なモデルを確認
available = []
if self.anthropic_api_key:
available.append("claude")
if self.openai_api_key:
available.append("openai")
print("Available models:", available)
def get_available_models(self):
models = []
if self.anthropic_api_key:
models.append("claude")
if self.openai_api_key:
models.append("openai")
return models |