Skip to content

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

Description

@shoang22

Hello,

I'm trying to use llm.nvim with my TGI deployment via the following vim.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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions