feat: add simulator page and image quote analyzer
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled

This commit is contained in:
2026-03-03 12:41:28 +08:00
parent 919c70789e
commit b663c7acbf
6 changed files with 605 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ from __future__ import annotations
from typing import Any
from .agents import AfterSalesAgent, PreSalesAgent, QuoteAgent, RiskAgent, RouterAgent
from .image_quote_analyzer import analyze_image_for_quote
from .models import Decision
from .state_machine import evolve_after_sales_state, migrate_state_schema
from .store import ConversationStore
@@ -38,6 +39,14 @@ class Orchestrator:
route, route_reason = await self.router.route(merged_ctx)
if route == "quote":
latest_image_url = str(context.get("latest_image_url", "") or "").strip()
if latest_image_url:
analysis = await analyze_image_for_quote(
image_url=latest_image_url,
customer_text=str(context.get("msg", "") or ""),
goods_name=str(context.get("goods_name", "") or ""),
)
merged_ctx["image_quote_analysis"] = analysis
decision = await self.quote.decide(merged_ctx)
elif route == "after_sales":
decision = await self.after_sales.decide(merged_ctx)