Update chatbot
This commit is contained in:
+8
-3
@@ -1,7 +1,10 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
# Use an absolute path so .env is found regardless of the process working
|
||||
# directory — under systemd the CWD may not be the project root.
|
||||
_here = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
load_dotenv(os.path.join(_here, '.env'))
|
||||
|
||||
class Config:
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production'
|
||||
@@ -44,8 +47,10 @@ class Config:
|
||||
MAX_CONTENT_LENGTH = int(os.environ.get('MAX_CONTENT_LENGTH', 16 * 1024 * 1024))
|
||||
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'pdf', 'doc', 'docx', 'txt', 'zip', 'log'}
|
||||
|
||||
# Anthropic AI
|
||||
ANTHROPIC_API_KEY = os.environ.get('ANTHROPIC_API_KEY', '')
|
||||
# AI Chatbot — Groq (free tier: 14,400 req/day, no credit card, no region restrictions)
|
||||
# Get a key at: https://console.groq.com → API Keys
|
||||
GROQ_API_KEY = os.environ.get('GROQ_API_KEY', '')
|
||||
GROQ_MODEL = os.environ.get('GROQ_MODEL', 'llama-3.3-70b-versatile')
|
||||
|
||||
# Rate limiting storage.
|
||||
# The `limits` library (used by Flask-Limiter) does not support MySQL as a
|
||||
|
||||
Reference in New Issue
Block a user