Skip to content

Consider using a builder class for creating Messages #1594

Open
@markpollack

Description

@markpollack
Member

See #427 and related issue #1592

Activity

added this to the 1.0.0-M4 milestone on Oct 23, 2024
markpollack

markpollack commented on Oct 24, 2024

@markpollack
MemberAuthor

Looking at the classes, a builder (inner class) for UserMessage looks to be useful. Perhaps also for AssistantMessage. The other Message classes have very few constructor arguments, so the only reason there would be for consistency.

modified the milestones: 1.0.0-M4, 1.0.0-M5 on Nov 19, 2024
modified the milestones: 1.0.0-M5, backlog on Nov 22, 2024
ThomasVitale

ThomasVitale commented on May 9, 2025

@ThomasVitale
Contributor

UserMessage and SystemMessage have builders now. We could use one for AssistantMessage as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @markpollack@tzolov@ThomasVitale

        Issue actions

          Consider using a builder class for creating Messages · Issue #1594 · spring-projects/spring-ai