CodeGPT icon indicating copy to clipboard operation
CodeGPT copied to clipboard

jetbrains plugin:Qwen 2.5: suffix is not currently supported

Open mkhludnev opened this issue 1 year ago • 1 comments

What happened?

I have Qwen 2.5 deployed internally. The recent plugin in set into JetBrains Idea. Everything is almost fine - thanks for the great project. However, default CodeCompletion settings is little bit odd Screenshot from 2024-10-02 14-29-22 it causes

Unknown API response. Code: 400, Body: {"object":"error","message":"suffix is not currently supported","type":"BadRequestError","param":null,"code":400}

java.lang.RuntimeException
  at ee.carlrobert.llm.completion.CompletionEventSourceListener.onFailure(CompletionEventSourceListener.java:116)

Mitigation measure

After I remove suffix property and set the prompt, code completions seem working now. However, I'm not sure if it's right and quite appreciate if you confirm.

Screenshot from 2024-10-02 14-31-39

Relevant log output or stack trace

No response

Steps to reproduce

No response

CodeGPT version

2.11.4-241.1

Operating System

Linux

mkhludnev avatar Oct 02 '24 11:10 mkhludnev

Qwen2.5-Coder-7B-lnstruct suffix is not currently supported CleanShot 2024-10-05 at 13 49 30

me-v2 avatar Oct 05 '24 05:10 me-v2

Yes, I can confirm that this is a correct behaviour. The request body must contain either a raw prompt via the FIM_PREFIX placeholder or PREFIX and SUFFIX together. The suffix placeholder was added primarily for OpenAI text completions purposes.

Thanks for bringing it up, this needs to be documented better.

carlrobertoh avatar Nov 03 '24 00:11 carlrobertoh