Refactor backend configuration management and update environment settings
- Replace the `config.py` module with a new `settings.py` to streamline environment variable management, focusing on database, CORS, and TURN settings. - Update references throughout the backend codebase to use the new `settings` module instead of the deprecated `config`. - Modify the `.env.example` file to reflect the new configuration approach, indicating that model provider credentials should be maintained separately. - Enhance the `AssistantConfig` model to clarify the source of runtime connection information, ensuring it is injected from model resources rather than relying on defaults from the environment. - Introduce new user scripts for audio and video management in the Tampermonkey environment, enhancing WebRTC capabilities.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
from collections.abc import AsyncGenerator
|
||||
import json
|
||||
|
||||
import config
|
||||
import settings
|
||||
from services.interface_catalog import INTERFACE_DEFINITIONS
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy.ext.asyncio import (
|
||||
@@ -17,7 +17,7 @@ from sqlalchemy.ext.asyncio import (
|
||||
create_async_engine,
|
||||
)
|
||||
|
||||
engine = create_async_engine(config.DATABASE_URL, echo=False, pool_pre_ping=True)
|
||||
engine = create_async_engine(settings.DATABASE_URL, echo=False, pool_pre_ping=True)
|
||||
SessionLocal = async_sessionmaker(engine, expire_on_commit=False)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user