feat(advisor-agent): Introduce advisor agent functionalities with compliance, KYC, and script templates

- 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.
This commit is contained in:
2026-09-12 16:33:07 +08:00
parent 282f21932c
commit 70aa861983
74 changed files with 2516 additions and 813 deletions
+4 -4
View File
@@ -9,8 +9,8 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from app.repository.template_repository import TemplateRepository
from app.service.template_vector_service import TemplateVectorService
from app.repository.script_template_repository import ScriptTemplateRepository
from app.service.script_template_vector_service import ScriptScriptTemplateVectorService
def main() -> None:
@@ -19,13 +19,13 @@ def main() -> None:
parser.add_argument("--created-by", default=None, help="Optional created_by filter for development checks.")
args = parser.parse_args()
repository = TemplateRepository()
repository = ScriptTemplateRepository()
if args.dry_run:
total = len(repository.list_vector_candidates(created_by=args.created_by))
print(f"Template vector sync dry run: total={total}")
return
result = TemplateVectorService(repository=repository).sync_approved_templates(created_by=args.created_by)
result = ScriptScriptTemplateVectorService(repository=repository).sync_approved_templates(created_by=args.created_by)
print(
"Template vector sync: "
f"total={result.total}, upserted={result.upserted}, skipped={result.skipped}"