chore: update gitignore; feat: 新增customer_agent业务模块与api路由
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user