Files
ds_zagres_ai/local_test_config.py
T
Iyeoluwa Akinrinola 730009ae87 fixed team chats
2025-05-16 18:03:15 +01:00

36 lines
1.1 KiB
Python

"""
Configuration for local testing with remote server resources.
"""
import os
from dotenv import load_dotenv
# Try to load environment variables from .env file
dotenv_path = os.path.join(os.path.dirname(__file__), 'local_test.env')
load_dotenv(dotenv_path=dotenv_path)
# Configuration class
class LocalTestConfig:
"""Configuration for local testing with remote server resources."""
# Remote server configuration
SERVER_IP = os.environ.get('SERVER_IP', '104.225.217.215')
SERVER_PORT = os.environ.get('SERVER_PORT', '22')
SERVER_USER = os.environ.get('SERVER_USER', 'root')
# Ollama configuration
OLLAMA_API_URL = os.environ.get('OLLAMA_API_URL', f'http://{SERVER_IP}:11434')
# OpenWebUI configuration
OPENWEBUI_URL = os.environ.get('OPENWEBUI_URL', f'http://{SERVER_IP}:8080')
OPENWEBUI_API_KEY = os.environ.get('OPENWEBUI_API_KEY', '')
# Model configuration
DEFAULT_MODEL = os.environ.get('DEFAULT_MODEL', 'llama3.1')
# API timeout (in seconds)
API_TIMEOUT = int(os.environ.get('API_TIMEOUT', 300)) # 5 minutes
# Create a singleton instance
config = LocalTestConfig()