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

Support branching feature for Sydney #113

Closed
HyunggyuJang opened this issue Mar 22, 2023 · 6 comments · Fixed by #115
Closed

Support branching feature for Sydney #113

HyunggyuJang opened this issue Mar 22, 2023 · 6 comments · Fixed by #115

Comments

@HyunggyuJang
Copy link
Contributor

HyunggyuJang commented Mar 22, 2023

From time to time, I’d like to diverge to rather minor topic than the current one to explore some concept more deeply; after that I want to get back the original topic.
Such process is inherently having a tree structure, so with branching feature, we can achieve such use cases.

For now I’m relying on regeneration feature to emulate it, but it forces to regenerate semantically insignificant message just to mark a check point, also cannot branching from a message which has children already.

Fortunately enough, with #55, implementation is almost there, this extension should be straightforward by adding a button to AI generated message to be able to start from there afterward.

@danny-avila
Copy link
Owner

Hey thanks for the feedback.

If I'm understanding correctly, I think this is already somewhat possible by editing the message following the response you want to branch off from. It's an extra step but I believe has the desired effect?

@HyunggyuJang
Copy link
Contributor Author

Hey thanks for the feedback.

If I'm understanding correctly, I think this is already somewhat possible by editing the message following the response you want to branch off from. It's an extra step but I believe has the desired effect?

Currently, there is no straightforward way to edit the message already sent. The only way to do it is clicking the regeneration to branch off from the last prompt from the user, not from the response from the AI, which is usually where the user want to branch off. Also, it is not possible with that workaround to branch off from the message which has children already. Say

User: Hi

AI: Hello

User: What’s your name

AI: I’m Sydney

We cannot branch off from the message “Hello”, nor “Hi”. Only able to branch off from “What’s your name”.

@HyunggyuJang
Copy link
Contributor Author

HyunggyuJang commented Mar 23, 2023

From the implementation perspective, I think it would be sufficient to add a edit message button for all the messages generated by user; and allow to edit the message in place.

I’ll work on that on my free time.

@danny-avila
Copy link
Owner

From the implementation perspective, I think it would be sufficient to add a edit message button for all the messages generated by user; and allow to edit the message in place.

I’ll work on that on my free time.

Sorry I guess I was confused because there is already an edit function for all user messages and it allows editing in place. You can see it when you hover over the message. But I think you're talking about Bing/Sydney because this is exclusive to ChatGPT.

With Bing/Sydney here are my notes from @wtlyu who came up with regenerating for those models:
Regenerating creates a new request, but with a parameter that tells the server not to save the second userMessage and to connect the response parentMessageId to the first userMessage. This trick allows the response to be connected to the previous message, making it seem like a branching conversation. However, he suggests that this may actually be a bug because stopping generating or regenerating can cause new conversations to be created. and to quote directly: "My answer becomes that: regenerate and stop generating should not be enabled in bingai and sydney. because If you stop generating, the only thing you can do is create a new conversation. If you regenerate, the first response message cannot be appended new message."

@HyunggyuJang
Copy link
Contributor Author

HyunggyuJang commented Mar 23, 2023

As far as I know, the message tree (regeneration, stop response & message edit) totally fine with Sydney as it always open new conversion for each user prompt, and injecting all the conversation in the context into the previousMessages. So, for Sydney it shouldn't be a problem, and actually, the edit feature should be enabled for Sydney also.

For the plain bing AI, I think @wtlyu is right if we cling with the chatgpt-api, which doesn't allow to inject the context into previousMessages if we don't enable the jailbreak mode (if we do, it is just Sydney :) ).

@HyunggyuJang
Copy link
Contributor Author

HyunggyuJang commented Mar 23, 2023

Sorry I guess I was confused because there is already an edit function for all user messages and it allows editing in place. You can see it when you hover over the message. But I think you're talking about Bing/Sydney because this is exclusive to ChatGPT.

Ah, haven't look into the ChatGPT engines. Sorry for the misleading. I'll look into the implementation for that. Nice to know that! Thanks!

@HyunggyuJang HyunggyuJang changed the title Support branching feature Support branching feature for Sydney Mar 23, 2023
jinzishuai pushed a commit to jinzishuai/LibreChat that referenced this issue Nov 29, 2023
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 a pull request may close this issue.

2 participants