carlrobertoh / CodeGPT

The leading open-source AI copilot for JetBrains. Connect to any model in any environment, and customize your coding experience in any way you like.
https://codegpt.ee
Apache License 2.0
1.01k stars 213 forks source link

Problems with code completion using custom openai service (ollama) #514

Closed samyIO closed 4 months ago

samyIO commented 5 months ago

What happened?

In Pycharm 2023.3.4 i get an error message for every key i press when writing code. msg-too-short

here are the configs i use:

completion

Any idea?

Relevant log output or stack trace

No response

Steps to reproduce

No response

CodeGPT version

2.6.3-233

Operating System

Windows

PhilKes commented 5 months ago

You can not use the /v1/chat/completions API of Ollama for code-completions, you would need an OpenAI compatible /v1/completions API, which Ollama does not yet include. https://github.com/carlrobertoh/CodeGPT/pull/510 will introduce Ollama as a high-level service and enable code-completions with the native Ollama API. Same problem as in https://github.com/carlrobertoh/CodeGPT/issues/517