Skip to content

Introduce UID for Messages #77

Open
@OskarStark

Description

@OskarStark

We propose introducing UIDs for messages, which would be particularly beneficial in a frontend context. This approach would enable more efficient message handling by reducing unnecessary back-and-forth communication between the client and backend, especially when only the latest updates need to be tracked or pushed to the frontend.

Whenever responding to the frontend, we could push only the new messages.

The UID should ideally be generated based on the content of the Message. Initially, I considered using ULIDs, as they are sortable. However, ULIDs only work when generated on the fly with new, which isn’t feasible for our case since we need to be able to “recalculate” the UID when necessary.

Otherwise, we’d need to implement our own logic to handle this.

cc @silasjoisten as you’re working on the frontend
@DZunke for your awareness

One thing we’re uncertain about is whether we can send UIDs to the LLM or if they should be removed before querying the LLM.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions