Cleanup time!
This commit is contained in:
@@ -53,8 +53,8 @@ import datetime
|
||||
from pathlib import Path
|
||||
from typing import Dict, Any, List, Optional
|
||||
from openai import AsyncOpenAI
|
||||
from hermes_constants import OPENROUTER_BASE_URL
|
||||
|
||||
# Initialize OpenRouter API client lazily (only when needed)
|
||||
_openrouter_client = None
|
||||
|
||||
def _get_openrouter_client():
|
||||
@@ -66,7 +66,7 @@ def _get_openrouter_client():
|
||||
raise ValueError("OPENROUTER_API_KEY environment variable not set")
|
||||
_openrouter_client = AsyncOpenAI(
|
||||
api_key=api_key,
|
||||
base_url="https://openrouter.ai/api/v1"
|
||||
base_url=OPENROUTER_BASE_URL
|
||||
)
|
||||
return _openrouter_client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user