From 14fa7daf8e0a94b41687570ce968f84d58bd11fd Mon Sep 17 00:00:00 2001 From: JS <616458309@qq.com> Date: Fri, 14 Feb 2025 11:31:29 +0800 Subject: [PATCH] Improve the M5 version of Advisors Log example Signed-off-by: jingshi<616458309@qq.com> --- .../main/antora/modules/ROOT/pages/api/chatclient.adoc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc index 94ef91768a8..8e9f3460b94 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc @@ -480,7 +480,8 @@ You can customize what data from `AdvisedRequest` and `ChatResponse` is logged b ---- SimpleLoggerAdvisor( Function requestToString, - Function responseToString + Function responseToString, + int order ) ---- @@ -489,11 +490,14 @@ Example usage: [source,java] ---- SimpleLoggerAdvisor customLogger = new SimpleLoggerAdvisor( - request -> "Custom request: " + request.userText, - response -> "Custom response: " + response.getResult() + request -> "Custom request: " + request.userText(), + response -> "Custom response: " + response.getResult(), + 1 ); ---- This allows you to tailor the logged information to your specific needs. +TIP: At present, no specific function of this order parameter has been found. + TIP: Be cautious about logging sensitive information in production environments.