chore: update gitignore; feat: 新增customer_agent业务模块与api路由

This commit is contained in:
2026-09-11 11:02:15 +08:00
parent 5915319f9f
commit 2004b8fcf4
59 changed files with 3527 additions and 18 deletions
+19
View File
@@ -0,0 +1,19 @@
"""Knowledge-base events published by the operations workflow."""
from __future__ import annotations
KNOWLEDGE_UPDATE_EVENT = "event:knowledge_update"
async def publish_knowledge_update(
publisher, *, doc_id: str, collection_name: str, chunk_count: int, action: str | None = None
) -> None:
"""Publish only after the caller's atomic Milvus write has succeeded."""
payload = {
"doc_id": doc_id,
"collection_name": collection_name,
"chunk_count": chunk_count,
}
if action is not None:
payload["action"] = action
await publisher(KNOWLEDGE_UPDATE_EVENT, payload)