- Added new modules for advisor compliance, KYC sessions, and script templates, enhancing the advisor agent's capabilities. - Implemented a comprehensive API structure under the `/api/advisor-agent` prefix, ensuring clear organization and access to new features. - Established database models and repositories for compliance rules and KYC sessions, facilitating robust data management. - Integrated exception handling and response models to improve error management and user feedback. - Updated settings to include new configurations for compliance and KYC features, ensuring flexibility and adaptability. This update significantly expands the advisor agent's functionality, providing essential tools for compliance and customer interaction while maintaining a structured API design.
20 lines
470 B
Python
20 lines
470 B
Python
"""投资顾问 Agent ORM 会话工厂(与 merger utils.db 引擎一致)。"""
|
|
from __future__ import annotations
|
|
|
|
from sqlalchemy.orm import Session, sessionmaker
|
|
|
|
from app.config.settings import settings
|
|
from app.utils.db import get_engine
|
|
|
|
agent_engine = get_engine(settings.mysql_database)
|
|
|
|
AgentSessionLocal = sessionmaker(
|
|
bind=agent_engine,
|
|
autocommit=False,
|
|
autoflush=False,
|
|
)
|
|
|
|
|
|
def get_agent_session() -> Session:
|
|
return AgentSessionLocal()
|