Skip to content

Conversation

@woof-dog
Copy link
Contributor

@woof-dog woof-dog commented Feb 3, 2025

This pull request removes the disabled attribute on the textarea used for submitting responses and lets the user submit when they press enter, which stops a current llm response from continuing and inserts the user response after.

The Promise is just to wait for generateMessage to finish and add its message with StorageUtils.appendMsg.

This will close #11565

@ngxson ngxson merged commit 1d1e6a9 into ggml-org:master Feb 3, 2025
6 checks passed
if (this.isGenerating) {
this.stopGeneration();
while (this.isGenerating) {
await new Promise((resolve) => setTimeout(resolve, 10));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm on second thought, this is a bad user experience. User have no visibility that the next message has already been queued and will be send as long as the generation is complete.

I will have to revert this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I failed to consider queued completions. It would be nice, maybe in a future PR to still handle the stop+send when enter is pressed, which would be equivalent to clicking the Stop button and then clicking the Send button.

ngxson added a commit that referenced this pull request Feb 3, 2025
tinglou pushed a commit to tinglou/llama.cpp that referenced this pull request Feb 13, 2025
tinglou pushed a commit to tinglou/llama.cpp that referenced this pull request Feb 13, 2025
orca-zhang pushed a commit to orca-zhang/llama.cpp that referenced this pull request Feb 26, 2025
orca-zhang pushed a commit to orca-zhang/llama.cpp that referenced this pull request Feb 26, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Feb 26, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Feb 26, 2025
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Web UI: Allow typing in textarea during generation

2 participants