field messages is required when using code completion
What happened?
an error :field messages is required" occured when using code completion on a custom openai
Relevant log output or stack trace
CodeGPT
field messages is required (request id:
20240711173509677817336G6FsrA8p)
Steps to reproduce
I used custom openai and turned on the "enable code completions"
CodeGPT version
1.16.0
Operating System
Windows
It looks like the LLM you're trying to use does not support text completions. As the error indicates, the field messages is required, which is typically used only for chat completions.
Without more information, I'm unfortunately unable to provide further help.
I also meet this problem. I think this problem may come from the $SUFFIX and $PREFIX.
It sounds like you're using the /chat/completions api instead of the default /completions.
- /chat/completions requires a messages entry, and ignores prompt and suffix.
- /completions requires prompt, supports suffix for gpt-3.5-turbo-instruct, and ignores messages.
Since it sounds like you've changed the default configuration; can you tell us what your config you are using? Which model are you using, and how are you sending $PREFIX and $SUFFIX? I believe that gpt-3.5-turbo-instruct is the only model that supports fill-in-the-middle (of the openai models), and that model is only suported by the /completions endpoint.
The same