From 6ef05dd2e69db6be4b654661770ca69fc033a38b Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Sat, 14 Dec 2024 15:31:50 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20Add=20modelLabel=20to=20O?= =?UTF-8?q?penAIClient=20and=20PluginsClient=20options=20(#4995)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/clients/OpenAIClient.js | 1 + api/app/clients/PluginsClient.js | 1 + api/app/clients/specs/OpenAIClient.test.js | 1 + 3 files changed, 3 insertions(+) diff --git a/api/app/clients/OpenAIClient.js b/api/app/clients/OpenAIClient.js index 3554f4d654..9cde8b56e9 100644 --- a/api/app/clients/OpenAIClient.js +++ b/api/app/clients/OpenAIClient.js @@ -423,6 +423,7 @@ class OpenAIClient extends BaseClient { promptPrefix: this.options.promptPrefix, resendFiles: this.options.resendFiles, imageDetail: this.options.imageDetail, + modelLabel: this.options.modelLabel, iconURL: this.options.iconURL, greeting: this.options.greeting, spec: this.options.spec, diff --git a/api/app/clients/PluginsClient.js b/api/app/clients/PluginsClient.js index 09e3dc5adc..7259eb56f2 100644 --- a/api/app/clients/PluginsClient.js +++ b/api/app/clients/PluginsClient.js @@ -43,6 +43,7 @@ class PluginsClient extends OpenAIClient { return { artifacts: this.options.artifacts, chatGptLabel: this.options.chatGptLabel, + modelLabel: this.options.modelLabel, promptPrefix: this.options.promptPrefix, tools: this.options.tools, ...this.modelOptions, diff --git a/api/app/clients/specs/OpenAIClient.test.js b/api/app/clients/specs/OpenAIClient.test.js index 2fa37957d1..ab70d4c907 100644 --- a/api/app/clients/specs/OpenAIClient.test.js +++ b/api/app/clients/specs/OpenAIClient.test.js @@ -412,6 +412,7 @@ describe('OpenAIClient', () => { it('should return the correct save options', () => { const options = client.getSaveOptions(); expect(options).toHaveProperty('chatGptLabel'); + expect(options).toHaveProperty('modelLabel'); expect(options).toHaveProperty('promptPrefix'); }); });