I'd like to report a typo in the Spring AI documentation section on Chat Client API "Returning an Entity."(https://docs.spring.io/spring-ai/reference/api/chatclient.html) Specifically, in the example for the parameterizedTypeReference.

The current example shows:

List<ActorFilms> actorFilms = chatClient.prompt()
    .user("Generate the filmography of 5 movies for Tom Hanks and Bill Murray.")
    .call()
    .entity(new ParameterizedTypeReference<List<ActorsFilms>>() {
    });

However, based on my understanding, it should likely be:

List<ActorFilms> actorFilms = chatClient.prompt()
    .user("Generate the filmography of 5 movies for Tom Hanks and Bill Murray.")
    .call()
    .entity(new ParameterizedTypeReference<List<ActorFilms>>() {
    });

This change would ensure the reference captures a list of ActorFilms objects.

Comment From: devholic22

@AshwinKrishnaK I think you're right. Can I make a Pull Request?

Comment From: AshwinKrishnaK

@devholic22 I have already done that from my side.