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

Model API: ChatMessage now includes an id field #1437

Merged
merged 5 commits into from
Mar 6, 2025

Conversation

jjallaire-aisi
Copy link
Collaborator

The id defaults to shortuuid.uuid() and is assigned at creation.

The id is preserved during ordinary course of business transformations including:

  1. When messages are combined to meet the constraints of APIs which prohibit consecutive user or assistant messages (in which case the id of the first message is used).
  2. When messages are edited to base64 encode images or de-duplicate content.

@jjallaire-aisi jjallaire-aisi merged commit 08ed7ff into main Mar 6, 2025
11 checks passed
@jjallaire-aisi jjallaire-aisi deleted the feature/message-id branch March 6, 2025 11:21
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

Successfully merging this pull request may close these issues.

2 participants