From 2467f0c313ebe0abbde83c8f9603c113ac4bd932 Mon Sep 17 00:00:00 2001 From: Brace Sproul Date: Fri, 5 Apr 2024 09:15:21 -0700 Subject: [PATCH] chore: lint files (#4990) --- langchain-core/src/utils/testing/index.ts | 24 ++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/langchain-core/src/utils/testing/index.ts b/langchain-core/src/utils/testing/index.ts index 22a69169ec4b..fb9e96606cb8 100644 --- a/langchain-core/src/utils/testing/index.ts +++ b/langchain-core/src/utils/testing/index.ts @@ -219,22 +219,24 @@ export class FakeStreamingChatModel extends BaseChatModel { messages: BaseMessage[], _options: this["ParsedCallOptions"], _runManager?: CallbackManagerForLLMRun - ): Promise { + ): Promise { if (this.thrownErrorString) { throw new Error(this.thrownErrorString); } const content = this.responses?.[0].content ?? messages[0].content; const generation: ChatResult = { - generations: [{ - text: "", - message: new AIMessage({ - content, - }) - }] - } + generations: [ + { + text: "", + message: new AIMessage({ + content, + }), + }, + ], + }; - return generation + return generation; } async *_streamResponseChunks( @@ -253,7 +255,7 @@ export class FakeStreamingChatModel extends BaseChatModel { message: new AIMessageChunk({ content, }), - }) + }); } } else { for (const _ of this.responses ?? messages) { @@ -262,7 +264,7 @@ export class FakeStreamingChatModel extends BaseChatModel { message: new AIMessageChunk({ content, }), - }) + }); } } }