Skip to content

Conversation

@dev-jonghoonpark
Copy link
Contributor

@dev-jonghoonpark dev-jonghoonpark commented Jun 23, 2025

Issue

In https://docs.spring.io/spring-ai/reference/api/chatclient.html,
The SimpleLoggerAdvisor class documentation incorrectly shows a constructor signature:

SimpleLoggerAdvisor(
    Function<AdvisedRequest, String> requestToString,
    Function<ChatResponse, String> responseToString
)

However, the actual constructor includes an additional parameter, int order.

Additionally, the AdvisedRequest class does not include a variable named userText.

Correction

Update the documentation to reflect the correct constructor:

SimpleLoggerAdvisor(
    Function<AdvisedRequest, String> requestToString,
    Function<ChatResponse, String> responseToString,
    int order
)

And Update the example to replace the incorrect userText reference with request.prompt().getUserMessage()

@dev-jonghoonpark dev-jonghoonpark changed the title docs: correct SimpleLoggerAdvisor documentation docs: correct SimpleLoggerAdvisor documentation Jun 23, 2025
@dev-jonghoonpark dev-jonghoonpark marked this pull request as draft June 23, 2025 03:44
@dev-jonghoonpark dev-jonghoonpark force-pushed the docs/update-chatclient branch from 8a9b2f9 to 517f16c Compare June 23, 2025 03:55
@dev-jonghoonpark dev-jonghoonpark marked this pull request as ready for review June 23, 2025 03:59
@ilayaperumalg ilayaperumalg self-assigned this Jun 23, 2025
@ilayaperumalg ilayaperumalg added the documentation Improvements or additions to documentation label Jun 23, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.x milestone Jun 23, 2025
@dev-jonghoonpark dev-jonghoonpark force-pushed the docs/update-chatclient branch from 517f16c to 0533529 Compare June 23, 2025 10:33
@ilayaperumalg ilayaperumalg merged commit 8733938 into spring-projects:main Jun 23, 2025
2 checks passed
spring-builds pushed a commit that referenced this pull request Jun 23, 2025
Fixes #3638

Signed-off-by: jonghoonpark <[email protected]>
(cherry picked from commit 8733938)
scionaltera pushed a commit to scionaltera/spring-ai that referenced this pull request Sep 3, 2025
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation for: backport-to-1.0.x status: backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants