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
This commit is contained in:
Danny Avila 2023-07-15 12:19:23 -04:00 committed by GitHub
parent 15987abe0a
commit 39ac8d3858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
module.exports = {
printWidth: 100,
useTabs: false,
tabWidth: 2,
// tabWidth: 2,
semi: true,
singleQuote: true,
// bracketSpacing: false,

View file

@ -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';
}