carlrobertoh / CodeGPT

JetBrains extension providing access to state-of-the-art LLMs, such as GPT-4, Claude 3, Code Llama, and others, all for free
https://codegpt.ee
Apache License 2.0
885 stars 184 forks source link

请问该如何完成code completion功能的配置? #574

Closed YangWaldon closed 2 weeks ago

YangWaldon commented 1 month ago

What happened?

When testing the code completion feature, it always shows an error. The screenshot of the error is as follows:

Relevant log output or stack trace

No response

Steps to reproduce

image image

CodeGPT version

2.7.1-241

Operating System

Windows

PhilKes commented 1 month ago

I am guessing the "ezchat" API is some sort of Proxy for OpenAI's API? If you are trying to use gpt-3.5-turbo-instruct you should use the /v1/completions, not /v1/chat/completions is compatible with that model for code-completions. You look at the Azure OpenAI Preset template for the body:

image

YangWaldon commented 1 month ago

gpt-3.5-turbo-instruct

Thank you, I solved my problem according to your instructions, but what do you mean by Azure OpenAI?

PhilKes commented 1 month ago

gpt-3.5-turbo-instruct

Thank you, I solved my problem according to your instructions, but what do you mean by Azure OpenAI?

Good to hear that its working for you now. I just wanted to point out that you can look at the Azure OpenAI Preset template to see how to set the Body for /v1/completions image

YangWaldon commented 1 month ago

gpt-3.5-turbo-instruct

Thank you, I solved my problem according to your instructions, but what do you mean by Azure OpenAI?

Good to hear that its working for you now. I just wanted to point out that you can look at the Azure OpenAI Preset template to see how to set the Body for /v1/completions image

I see what you mean. Thank you again.