🐛 acknowledge useLegacyCompletionsEndpoint
This commit is contained in:
parent
ed3d4d5ed9
commit
0180d86e34
2 changed files with 8 additions and 0 deletions
2
core/index.d.ts
vendored
2
core/index.d.ts
vendored
|
|
@ -289,6 +289,8 @@ export interface LLMOptions {
|
|||
apiKey?: string;
|
||||
apiBase?: string;
|
||||
|
||||
useLegacyCompletionsEndpoint?: boolean;
|
||||
|
||||
// Azure options
|
||||
engine?: string;
|
||||
apiVersion?: string;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ const CHAT_ONLY_MODELS = [
|
|||
class OpenAI extends BaseLLM {
|
||||
public useLegacyCompletionsEndpoint = false;
|
||||
|
||||
constructor(options: LLMOptions) {
|
||||
super(options);
|
||||
this.useLegacyCompletionsEndpoint =
|
||||
options.useLegacyCompletionsEndpoint ?? false;
|
||||
}
|
||||
|
||||
static providerName: ModelProvider = "openai";
|
||||
static defaultOptions: Partial<LLMOptions> = {
|
||||
apiBase: "https://api.openai.com/v1/",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue