sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.53k stars 261 forks source link

bug: Expected to receive exactly one message with the prompt #5347

Open KelvinChung2000 opened 2 weeks ago

KelvinChung2000 commented 2 weeks ago

Version

1.92.2

Describe the bug

The auto complete fail to works and output the following error.

█ getInlineCompletions:error: error parsing CodeCompletionResponse: Error: {"error":"Expected to receive exactly one message with the prompt"} Error: error parsing CodeCompletionResponse: Error: {"error":"Expected to receive exactly one message with the prompt"}
    at /home/kelvin/.vscode/extensions/sourcegraph.cody-ai-1.32.3/dist/extension.node.js:194001:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async generatorWithTimeout (/home/kelvin/.vscode/extensions/sourcegraph.cody-ai-1.32.3/dist/extension.node.js:171241:31)
    at async generatorWithErrorObserver (/home/kelvin/.vscode/extensions/sourcegraph.cody-ai-1.32.3/dist/extension.node.js:171218:21)
    at async fetchAndProcessDynamicMultilineCompletions (/home/kelvin/.vscode/extensions/sourcegraph.cody-ai-1.32.3/dist/extension.node.js:191898:62)
    at async Promise.all (index 0)
    at async zipGenerators (/home/kelvin/.vscode/extensions/sourcegraph.cody-ai-1.32.3/dist/extension.node.js:171207:17)
    at async generateCompletions (/home/kelvin/.vscode/extensions/sourcegraph.cody-ai-1.32.3/dist/extension.node.js:192197:26)

Expected behavior

It should work

Additional context

I am using Anthropic for code completion. I have not set the endpoint since the configuration said I do not need to. I have tried to use the ollama, and it does not produce any error. The default null, which I think points to fireworks work. I am a pro user as well, if this information helps.

arunsathiya commented 2 weeks ago

The original issue was reopened recently: