From 65686001c0b3064a54947267370db30010031198 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Mon, 26 Aug 2024 09:38:53 -0700 Subject: [PATCH] mistral[patch]: Hide secrets --- libs/langchain-mistralai/src/chat_models.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/langchain-mistralai/src/chat_models.ts b/libs/langchain-mistralai/src/chat_models.ts index b8d1a6348f70..b95f0449a922 100644 --- a/libs/langchain-mistralai/src/chat_models.ts +++ b/libs/langchain-mistralai/src/chat_models.ts @@ -800,6 +800,18 @@ export class ChatMistralAI< this.streamUsage = fields?.streamUsage ?? this.streamUsage; } + get lc_secrets(): { [key: string]: string } | undefined { + return { + apiKey: "MISTRAL_API_KEY", + }; + } + + get lc_aliases(): { [key: string]: string } | undefined { + return { + apiKey: "mistral_api_key", + }; + } + getLsParams(options: this["ParsedCallOptions"]): LangSmithParams { const params = this.invocationParams(options); return {