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

Text gets deleted if command fails #93

Open
asmeurer opened this issue Mar 18, 2024 · 1 comment
Open

Text gets deleted if command fails #93

asmeurer opened this issue Mar 18, 2024 · 1 comment

Comments

@asmeurer
Copy link

If you run a command like ellama-improve-grammar on a selection, but the command fails for some reason, the paragraph is just completely deleted. For example, this happened to me because I misconfigured my OpenAI API key permissions, but I imagine it could also happen if the API service or my internet went down.

I think it would be better if ellama commands like this did not actually attempt to delete any text from the buffer until the LLM command completes. Perhaps there's an issue with race conditions here, but I would even be OK if it blocked (so long as there was some sort of progress indicator).

At the very least, though, if a command fails for some reason, it should reinsert the original text into the buffer.

@s-kostyaev
Copy link
Owner

Blocker for this issue ahyatt/llm#37

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

No branches or pull requests

2 participants