Initial commit for deployment
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"""
|
||||
Configuration settings for the AI service.
|
||||
"""
|
||||
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
|
||||
class Config:
|
||||
"""Base configuration."""
|
||||
|
||||
# API configuration
|
||||
API_HOST = os.environ.get('API_HOST', '0.0.0.0')
|
||||
API_PORT = int(os.environ.get('API_PORT', 5251))
|
||||
|
||||
# OpenWebUI configuration
|
||||
OPENWEBUI_URL = os.environ.get('OPENWEBUI_URL', 'http://104.225.217.215:8080')
|
||||
OPENWEBUI_API_KEY = os.environ.get('OPENWEBUI_API_KEY', '')
|
||||
|
||||
# Ollama configuration
|
||||
OLLAMA_API_URL = os.environ.get('OLLAMA_API_URL', 'http://localhost:11434')
|
||||
DEFAULT_MODEL = os.environ.get('DEFAULT_MODEL', 'llama3.1')
|
||||
|
||||
# Local storage
|
||||
SQLITE_DB_PATH = os.environ.get('SQLITE_DB_PATH', 'ai_service/data/chatbot.db')
|
||||
|
||||
# Document processing
|
||||
CHUNK_SIZE = int(os.environ.get('CHUNK_SIZE', 1000))
|
||||
CHUNK_OVERLAP = int(os.environ.get('CHUNK_OVERLAP', 200))
|
||||
|
||||
# Embedding model
|
||||
EMBEDDING_MODEL = os.environ.get('EMBEDDING_MODEL', 'all-MiniLM-L6-v2')
|
||||
|
||||
|
||||
config = Config()
|
||||
Reference in New Issue
Block a user