You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Things in the design have changed, they isn't a common interface for document and message anymore. The response from OpenAI API will have an ID in it for the entire response. That can be used to uniquely identify the message. The inner payload that contains user messages in the response does not contain an ID. So you can use the outer one to create a synthetic ID if there is more than on user message in the response (when n > 1).
We we are approaching RC1, and haven't had other requests to add message ID into the core domain object, I think you can use that ID from the response and then add that to a message object which you persist to the thumbs up and thumbs down evaluation.
Post RC1/GA we can investigate the use case (which I agree is super common) and see if there is something that need to be added to the Message objects ,which are design really for the transfer back and forth with the model.
Uh oh!
There was an error while loading. Please reload this page.
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 ofMessage
, i.e.Content
) the id field is provided directly, and not as a part of its metadataSo my suggestion is just to add
String getId();
toorg.springframework.ai.model.Content
If you think this is a good idea I can prepare the PR
The text was updated successfully, but these errors were encountered: