From 96aefde2ed8d095352fea2ed33c93a22ec21710e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 22 Apr 2024 21:54:03 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20merge=20mistakes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/index.ts | 17 ----------------- core/llm/llms/OpenAI.ts | 6 ------ 2 files changed, 23 deletions(-) diff --git a/core/llm/index.ts b/core/llm/index.ts index 820079463..0e3208ffc 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -66,23 +66,6 @@ export abstract class BaseLLM implements ILLM { return ["ollama", "anthropic"].includes(this.providerName); } - supportsCompletions(): boolean { - if (this.providerName === "openai") { - if ( - this.apiBase?.includes("api.groq.com") || - this.apiBase?.includes(":1337") - ) { - // Jan + Groq don't support completions : ( - return false; - } - } - return true; - } - - supportsPrefill(): boolean { - return ["ollama", "anthropic"].includes(this.providerName); - } - uniqueId: string; model: string; diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index 55bcfbd6d..d8f4214ac 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -45,12 +45,6 @@ class OpenAI extends BaseLLM { this.useLegacyCompletionsEndpoint = options.useLegacyCompletionsEndpoint; } - constructor(options: LLMOptions) { - super(options); - this.useLegacyCompletionsEndpoint = - options.useLegacyCompletionsEndpoint ?? false; - } - static providerName: ModelProvider = "openai"; static defaultOptions: Partial = { apiBase: "https://api.openai.com/v1/",