Skip to content

KeyError: 'choices' #7

Description

@jkallio

I installed the plugin (with Lazy) and updated remote plugins successfully...

:UpdateRemotePlugins
remote/host: python3 host registered plugins ['plugin.py']
remote/host: generated rplugin manifest: /home/jussi/.local/share/nvim/rplugin.vim

...but everytime I try to use the plugin itself it gives me the following error:

:CopilotChat explain this code?

error caught in async handler '/home/jussi/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/plugin.py:command:CopilotCh
Traceback (most recent call last):
  File "/home/jussi/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/plugin.py", line 67, in copilotChat
    for token in self.copilot.ask(prompt, code, language=file_type):
  File "/home/jussi/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/copilot.py", line 111, in ask
    content = line["choices"][0]["delta"]["content"]
              ~~~~^^^^^^^^^^^
KeyError: 'choices'

System Information:
Arch Linux 6.6.8-arch1-1
Neovim v0.10.0-dev-1991+gdd00b6b44
Python 3.11.6
python-dotenv 1.0.0-2
python-requests 2.31.0-1
python-pynvim 0.5.0-2
python-prompt_toolkit 3.0.43-1

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