Skip to content

org.springframework.ai.chat.messages.Message should have a getId() method #2902

Open
@enricorampazzo

Description

@enricorampazzo

Let's say I have a chatbot, and I want the user to be able to give a feedback on whether the assistant message is good or not: it is necessary to have an id to identify that message univocally, but at the moment the Message interface does not have a way to get it.

Of course it would be possible to just have it in the message metadata, however for Document (which has the same super interface of Message, i.e. Content) the id field is provided directly, and not as a part of its metadata

So my suggestion is just to add

String getId(); to org.springframework.ai.model.Content

If you think this is a good idea I can prepare the PR

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions