debug: rag-chat 日志输出 AI parsed 结构
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 43s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-06-06 14:28:35 +08:00
parent 3d8246cf6e
commit 69bcd07a0f

View File

@ -76,7 +76,7 @@ export class RagChatService {
messages,
maxTokens: 2048,
});
this.logger.log(`AI Gateway response: parsed=${!!resp.parsed}`);
this.logger.log(`AI Gateway response: parsed=${!!resp.parsed}, keys=${resp.parsed ? Object.keys(resp.parsed).join(',') : 'null'}, raw=${JSON.stringify(resp.parsed).substring(0, 300)}`);
reply = resp.parsed?.answer ?? String(resp.parsed?.content ?? '抱歉AI 暂时无法生成回答。');
citations = context.citations;
} catch (err: any) {