Skip to content

Traceback when 'choices' list is empty #12

Description

@jdstrand

FYI, today I needed to do this: jdstrand@cf01ac1 because of this line https://github.com/gptlang/CopilotChat.nvim/blob/main/rplugin/python3/copilot.py#L119:

content = line["choices"][0]["delta"]["content"]

For some reason, today 'choices' was at first coming back empty. I don't know what it used to do, but now it is sometimes coming back as an empty list, but doing the above patch allows things to work again (ie, if len(line["choices"]) == 0, continue).

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