23 lines
819 B
Python
23 lines
819 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
|
|
# Load environment variables
|
|
load_dotenv()
|
|
|
|
# Database configuration
|
|
DB_CONFIG = {
|
|
'host': os.getenv('MYSQL_HOST', '47.130.80.140'),
|
|
'user': os.getenv('MYSQL_USER', 'root'),
|
|
'password': os.getenv('MYSQL_PASSWORD', '1ibL5A5cGevvM7Ax0ZDqyKXQTHMlEW5D5hwG6OcR7KPF77kMkEfxFEbLDtwzr6Ci'),
|
|
'database': os.getenv('MYSQL_DATABASE', 'agc'),
|
|
'port': int(os.getenv('MYSQL_PORT', '3333'))
|
|
}
|
|
|
|
# OpenAI configuration
|
|
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
|
|
OPENAI_EMBEDDING_MODEL = os.getenv('OPENAI_EMBEDDING_MODEL', 'text-embedding-ada-002')
|
|
OPENAI_CHAT_MODEL = os.getenv('OPENAI_CHAT_MODEL', 'gpt-3.5-turbo')
|
|
|
|
# Application settings
|
|
MAX_SEARCH_RESULTS = int(os.getenv('MAX_SEARCH_RESULTS', 10))
|
|
SIMILARITY_THRESHOLD = float(os.getenv('SIMILARITY_THRESHOLD', 0.7)) |