feat: 添加请求ID到意图代理逻辑中,以增强日志记录和请求跟踪

This commit is contained in:
zhaoyingbo 2025-01-29 01:36:02 +00:00
parent 67f8285f05
commit 7540efaa3a

View File

@ -65,6 +65,7 @@ const agent = async (ctx: Context): Promise<Intent> => {
const { const {
larkBody: { msgText }, larkBody: { msgText },
logger, logger,
requestId,
} = ctx } = ctx
let attempts = 0 let attempts = 0
@ -76,8 +77,8 @@ const agent = async (ctx: Context): Promise<Intent> => {
time: new Date().toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" }), time: new Date().toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" }),
jsonSchema, jsonSchema,
}, },
"test", requestId,
0, 0.5,
true true
) )