From 39ac8d3858fb3df8e0c5d0ee898f71195a4b864d Mon Sep 17 00:00:00 2001 From: Danny Avila <110412045+danny-avila@users.noreply.github.com> Date: Sat, 15 Jul 2023 12:19:23 -0400 Subject: [PATCH] fix: typo when including proxy for langchain (#653) * fix(PluginsClient.js): change reverseProxyUrl variable to options.reverseProxyUrl * chore(.prettierrc.js): comment out tabWidth option in Prettier configuration --- .prettierrc.js | 2 +- api/app/clients/PluginsClient.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index ea7ab4bf84..0e3b47b9cc 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,7 +1,7 @@ module.exports = { printWidth: 100, useTabs: false, - tabWidth: 2, + // tabWidth: 2, semi: true, singleQuote: true, // bracketSpacing: false, diff --git a/api/app/clients/PluginsClient.js b/api/app/clients/PluginsClient.js index 4ccf1435e1..43054aa6e0 100644 --- a/api/app/clients/PluginsClient.js +++ b/api/app/clients/PluginsClient.js @@ -112,8 +112,8 @@ Only respond with your conversational reply to the following User Message: super.setOptions(options); this.isGpt3 = this.modelOptions.model.startsWith('gpt-3'); - if (this.reverseProxyUrl) { - this.langchainProxy = this.reverseProxyUrl.match(/.*v1/)[0]; + if (this.options.reverseProxyUrl) { + this.langchainProxy = this.options.reverseProxyUrl.match(/.*v1/)[0]; } } @@ -469,7 +469,7 @@ Only respond with your conversational reply to the following User Message: } // testing if this works with browser endpoint - if (!this.isGpt3 && this.reverseProxyUrl) { + if (!this.isGpt3 && this.options.reverseProxyUrl) { instructionsPayload.role = 'user'; }