Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message-id to messages list in API response #83

Open
sarfudheen opened this issue Oct 9, 2023 · 1 comment
Open

Add message-id to messages list in API response #83

sarfudheen opened this issue Oct 9, 2023 · 1 comment

Comments

@sarfudheen
Copy link

Current Implementation:

Actual call to http://MOTOR_URL/sessions/{session-id}/memory returns a list of messages in the following format:

{
    "messages": [
        {
            "role": "AI",
            "content": "Test."
        },
        {
            "role": "Human",
            "content": "Test"
        },
          ],
    "context": null,
    "tokens": 0
}

Enhancement Request:

In the messages list, it would be beneficial to include a unique message-id for each message. This enhancement would facilitate the ability to delete or update a specific message content. Here's the updated format:

{
    "messages": [
        {
            "role": "AI",
            "content": "Test.",
            "message-id" : "uuid"
        },
        {
            "role": "Human",
            "content": "Test",
            "message-id" : "uuid"
        },
          ],
    "context": null,
    "tokens": 0
}
@Czechh Czechh changed the title Add message-id to messages list in API response Sweep: Add message-id to messages list in API response Oct 9, 2023
@Czechh Czechh changed the title Sweep: Add message-id to messages list in API response Add message-id to messages list in API response Oct 9, 2023
@jasgeo75
Copy link

Absolutely, this!

It would allow us to manage more efficiently what we're "remembering" (and paying OpenAI for).

Being able to delete messages from the contextual memory is the best feature of the playground, for example. But oddly, you rarely if ever, see it implemented anywhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants