Skip to content

Commit

Permalink
only update generic apikey in chat openai
Browse files Browse the repository at this point in the history
  • Loading branch information
haouarihk committed Mar 18, 2024
1 parent 05dcebc commit 138a2b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LLMProviders/langchain/openaiChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const default_values = {

export default class LangchainOpenAIChatProvider
extends LangchainBase
implements LLMProviderInterface
{
implements LLMProviderInterface {
/** for models to know what provider is that, for example if this class is being extended. and the id changes. */

static provider = "Langchain";
Expand Down Expand Up @@ -58,7 +57,8 @@ export default class LangchainOpenAIChatProvider
type="password"
value={config.api_key || ""}
setValue={async (value) => {
global.plugin.settings.api_key = value;
if (props.self.originalId == id)
global.plugin.settings.api_key = value;
config.api_key = value;

global.triggerReload();
Expand Down

0 comments on commit 138a2b4

Please sign in to comment.