huggingface / huggingface/llm.nvim

Attempt to call field 'nvim_create_user_command' (a nil value)

Open
#110 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
1.2k
Forks
58
Avg merge
30m
Merged PRs (30d)
1

Description

Hello,

I'm trying to use llm.nvim with my TGI deployment via the following `vim.lua`:

```lua
local vim= vim
local Plug = vim.fn['plug#']

vim.call('plug#begin')

-- Shorthand notation for GitHub; translates to https://github.com/junegunn/seoul256.vim.git
-- On-demand loading: loaded when the specified command is executed
Plug('preservim/nerdtree', { ['on'] = 'NERDTreeToggle' })
Plug 'huggingface/llm.nvim'

vim.call('plug#end')

-- Huggingface stuff
local llm = require('llm')

require('llm').setup({
backend = "tgi",
model = "teknium/OpenHermes-2.5-Mistral-7B",
url = "http://localhost:8080", -- llm-ls uses "/generate"
-- cf https://huggingface.github.io/text-generation-inference/#/Text%20Generation%20Inference/generate
request_body = {
parameters = {
temperature = 0.2,
top_p = 0.95,
}
}
})
```

when i attempt to install, i get the following error:

```
E5113: Error while calling lua chunk: ...even/.local/share/nvim/plugged/llm.nvim/lua/llm/init.lua:9: attempt to call field 'nvim_create_user_command' (a nil value)
stack traceback:
...even/.local/share/nvim/plugged/llm.nvim/lua/llm/init.lua:9: in function 'create_cmds'
...even/.local/share/nvim/plugged/llm.nvim/lua/llm/init.lua:23: in function 'setup'
/home/steven/.config/nvim/init.lua:18: in main chunk
```

is there something that I'm missing?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.