Merge branch 'fix/supportscompletions' of https://github.com/bufferoverflow/continue into bufferoverflow-fix/supportscompletions

This commit is contained in:
Nate Sesti 2024-04-18 15:30:35 -07:00
commit 78dd9af628
2 changed files with 8 additions and 1 deletions

View file

@ -52,7 +52,8 @@ export abstract class BaseLLM implements ILLM {
if (this.providerName === "openai") {
if (
this.apiBase?.includes("api.groq.com") ||
this.apiBase?.includes(":1337")
this.apiBase?.includes(":1337") ||
this._llmOptions.useLegacyCompletionsEndpoint?.valueOf() === false
) {
// Jan + Groq don't support completions : (
return false;

View file

@ -52,4 +52,10 @@ If you are [using an OpenAI compatible server / API](../../model-setup/select-pr
}
```
To force usage of `chat/completions` instead of `completions` endpoint you can set
```json
"useLegacyCompletionsEndpoint": false
```
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/OpenAI.ts)