修复dispatch_custom_event:用config参数
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m26s
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m26s
This commit is contained in:
@@ -24,9 +24,7 @@ async def dispatch_custom_event(
|
|||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
from langchain_core.callbacks.manager import adispatch_custom_event
|
from langchain_core.callbacks.manager import adispatch_custom_event
|
||||||
callbacks = config.get("callbacks")
|
await adispatch_custom_event(event_name, data, config=config)
|
||||||
if callbacks:
|
|
||||||
await adispatch_custom_event(event_name, data, callbacks=callbacks)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
# 事件发送失败不应中断主流程
|
# 事件发送失败不应中断主流程
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user