wip: 客服Agent + RAG + 画像收尾(基于 6516ccb)
This commit is contained in:
@@ -13,6 +13,7 @@ from app.main import create_app
|
||||
from app.model.audit import InteractionAudit
|
||||
from app.model.conversation import ConversationMessage
|
||||
from app.model.platform import AgentRun, DomainEventOutbox, OutboxDelivery, RequestIdempotency
|
||||
from app.service.agent.governance import FALLBACK_DISCLAIMER
|
||||
from app.service.agent_persistence_service import AgentPersistenceService
|
||||
from app.service.agent_run_application_service import AgentRunApplicationService
|
||||
from app.worker.runtime import WorkerRuntime
|
||||
@@ -50,7 +51,10 @@ async def test_http_accept_worker_commit_query_and_repeat(acceptance_registry, r
|
||||
result = (await client.get(f"/api/v1/agent-runs/{run_id}")).json()["data"]
|
||||
assert result["status"] == ("failed" if revoked else "succeeded")
|
||||
if not revoked:
|
||||
assert result["result"]["content"] == "test result"
|
||||
# 治理层强制注入固定免责声明(门禁 F5:面向客户输出 100% 附固定话术),
|
||||
# 落库正文因此是「Agent 正文 + 免责声明」,不再是纯正文——断言改为包含。
|
||||
assert result["result"]["content"].startswith("test result")
|
||||
assert FALLBACK_DISCLAIMER in result["result"]["content"]
|
||||
assert not await runtime.execute(run_id)
|
||||
async with SessionFactory() as session:
|
||||
messages = list(await session.scalars(select(ConversationMessage).where(
|
||||
|
||||
Reference in New Issue
Block a user