Skip to content

Typo in ParameterizedTypeReference Example - Spring AI Documentation #966

@AshwinKrishnaK

Description

@AshwinKrishnaK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions