🐛 set supportsCompletions based on useLegacyCompletionsEndpoint model setting

Closes #1132
This commit is contained in:
Roger Meier 2024-04-18 21:42:32 +02:00 • committed by Peter Zaback
parent 88fcace507
commit 514a642a05

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;