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
After reviewing and debugging the code, I'm unable to understand the purpose of parentId, since I want to add some message manually os I'm unable to use context in the class(I created for manual adding message),
for adding message manually to the chat I'm using sendMessage() method from chatManager class.
can someone explain why parentId is used for
The text was updated successfully, but these errors were encountered:
MirzaHasnat
changed the title
What does parentId for in the code?
What does parentId do in the code?
Aug 1, 2023
Good question! Each message in a chat is considered a 'reply' to the one above it. The parent ID is a reference to that earlier message.
If you're wondering why this is needed:
A message can have multiple replies (multiple messages with the same parent ID) when the Regenerate or Edit features are used. In both cases, a new message object is created with the same parent ID as the original. You can think of it like a tree structure. Whenever Regenerate or Edit is used, the tree of messages branches off in new directions.
Tracking the parent IDs makes it possible to list out a single path down through the branches of that tree, for display in the UI and also passing as context to the AI.
After reviewing and debugging the code, I'm unable to understand the purpose of parentId, since I want to add some message manually os I'm unable to use context in the class(I created for manual adding message),
for adding message manually to the chat I'm using sendMessage() method from chatManager class.
can someone explain why parentId is used for
The text was updated successfully, but these errors were encountered: