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

Enhancement: Better handle large amounts of pasted input text #2335

Open
1 task done
kzar opened this issue Apr 6, 2024 · 9 comments
Open
1 task done

Enhancement: Better handle large amounts of pasted input text #2335

kzar opened this issue Apr 6, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@kzar
Copy link

kzar commented Apr 6, 2024

What features would you like to see added?

One of the useful things about the Claude Opus model is the large context window, that can be used to do things like summarise large blocks of text. Unfortunately though, Librechat responds quite sluggishly when a large block of text is pasted into the input box.

More details

The official Claude web UI handles this well, large amounts of text are displayed as a small "Pasted" icon instead and the app doesn't slow down. It would be nice if Librechat could do something similar.

Which components are impacted by your request?

No response

Pictures

image

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kzar kzar added the enhancement New feature or request label Apr 6, 2024
@danny-avila
Copy link
Owner

Thanks! I'll look into it

@kzar
Copy link
Author

kzar commented Apr 6, 2024

If it helps, I'm guessing they're using the paste event and checking the clipboard length before deciding what to do.

@danny-avila
Copy link
Owner

If it helps, I'm guessing they're using the paste event and checking the clipboard length before deciding what to do.

Great point, will have to think how to best to implement

@danny-avila
Copy link
Owner

Also FYI and mostly a note for myself. The "delay" for long text only happens on chrome and I narrowed down exactly why. There would need to be a compromise for the current optimizations being handled for the textarea to fix it, but also may not address for a while.

@kzar
Copy link
Author

kzar commented Apr 16, 2024

If you want a second pair of eyes to look at that slow code, just shout (and link the code). Would be happy to have a quick look if it helps.

@jordantgh
Copy link
Contributor

jordantgh commented Apr 17, 2024

Speaking personally, I am quite often editing the pasted text, so I'm not sure the claude approach is ideal in all cases. Arguably it's better practise to get everything just right before pasting, but often enough I change my mind about what to include in the context as I'm drafting my query. I can see a case though for a pop out editor for larger prompts. But even ChatGPT doesn't have perfect UX on this, it seems like a hard problem.

@danny-avila
Copy link
Owner

If you want a second pair of eyes to look at that slow code, just shout (and link the code). Would be happy to have a quick look if it helps.

I figured out the root cause for this issue and I’ll be pushing a change today

@sbarrios93
Copy link

Unfortunately, this is still happening (not sure if the changes were pushed @danny-avila )

@danny-avila
Copy link
Owner

Unfortunately, this is still happening (not sure if the changes were pushed @danny-avila )

can you describe what is still happening? On both firefox/chrome, pasting large amounts of text does not incur a noticeable delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants