mirror of
https://github.com/Kartvaya2008/autostream-ai-agent
synced 2026-04-21 07:37:34 +00:00
Use environment variable for OpenRouter API key
This commit is contained in:
parent
a17102a7f8
commit
db6bd0f7d5
1 changed files with 3 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ import logging
|
|||
import re
|
||||
import time
|
||||
from typing import Optional
|
||||
import os
|
||||
|
||||
from memory import ConversationState, MemoryStore
|
||||
from intent import classify_intent, maybe_correct_intent, is_domain_relevant
|
||||
|
|
@ -20,7 +21,7 @@ from langchain_core.messages import HumanMessage, AIMessage, SystemMessage
|
|||
|
||||
logger = logging.getLogger("autostream.agent")
|
||||
|
||||
_OPENROUTER_API_KEY = "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"
|
||||
_OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY")
|
||||
_OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1"
|
||||
_OPENROUTER_MODEL = "openrouter/auto"
|
||||
_MAX_RETRIES = 3
|
||||
|
|
@ -297,4 +298,4 @@ class AutoStreamAgent:
|
|||
}
|
||||
|
||||
def reset_session(self, session_id: str):
|
||||
self.memory.reset(session_id)
|
||||
self.memory.reset(session_id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue