llm.nvim icon indicating copy to clipboard operation
llm.nvim copied to clipboard

Unreachable LLM server blocks UI

Open RemcoSchrijver opened this issue 2 years ago • 1 comments

When the configured LLM server is unreachable the UI is blocked by the error messages, making typing extremely slow. This can of course be negated by disabling generation, but maybe hiding the error message after 'n' times would be a better experience for the user?

RemcoSchrijver avatar Feb 07 '24 23:02 RemcoSchrijver

temporary solution

local isRunning = require("plenary.curl").get("http://localhost:11434", {
  timeout = 50,
  on_error = function(e) return { status = e.exit } end,
}).status == 200

require("llm").setup({
  enable_suggestions_on_startup = isRunning,
  ...

Amzd avatar Apr 21 '24 11:04 Amzd