-
Notifications
You must be signed in to change notification settings - Fork 493
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
AI Chat: only load history since most recent clear event #64741
Conversation
@@ -82,7 +82,6 @@ const aichatSlice = createSlice({ | |||
} | |||
|
|||
if (lastResetIndex >= 0) { | |||
state.chatEventsPast = action.payload.slice(0, lastResetIndex + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be useful for the user to see the clear chat notification to remind them that they took that user action, especially if they leave and then go back to the level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was torn on this -- the clear chat event seems like it would be somewhat clear to users, but changing the model ID, temperature, etc also resets the conversation, which feels like it would be less clear to see at the top of the conversation? Checking in Slack here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting - I didn't realize that we're clearing back to any event that clears the chat context.
I wonder if it would make sense to add a reminder within the model customization update:
code-dot-org/apps/i18n/aichat/en_us.json
Lines 82 to 83 in dfe8d1c
"modelUpdateText": "{fieldLabel} has been updated to {updatedText}. {timestamp}", | |
"modelUpdateText2": "{fieldLabel} has been updated. {timestamp}", |
Maybe something like, 'Reminder that your chat history has been cleared.'
?
cc: @dju90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to include the clear event, per Slack discussion.
I think there are a handful of changes/improvements that could be made now that we're showing history across page loads to users (I just jotted down a few, will share in Slack later). Maybe we could include this suggestion in that discussion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for asking product about my question.
Instead of showing a user their entire history on a level, only include the history that will be included in the subsequent conversation history sent to the model.
This currently does
notinclude the reset event itself in what the user sees.I'm a bit torn on this, but it seems sensible for the majority case at least (ie, the top-most message will likely be a message that a user sent that marks the beginning of the current conversation).Decided to include this, see discussion below.Links