From 7a416152f5d121baa427362a262ae3bf883db597 Mon Sep 17 00:00:00 2001 From: Kevin Nayar Date: Tue, 19 Nov 2024 12:15:49 -0600 Subject: [PATCH] await the generation in the no cache branch https://github.com/langchain-ai/langchainjs/issues/7172 --- langchain-core/src/language_models/chat_models.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain-core/src/language_models/chat_models.ts b/langchain-core/src/language_models/chat_models.ts index 0878d67def8e..b7c24f82a761 100644 --- a/langchain-core/src/language_models/chat_models.ts +++ b/langchain-core/src/language_models/chat_models.ts @@ -629,7 +629,7 @@ export abstract class BaseChatModel< runnableConfig.callbacks = runnableConfig.callbacks ?? callbacks; if (!this.cache) { - return this._generateUncached(baseMessages, callOptions, runnableConfig); + return await this._generateUncached(baseMessages, callOptions, runnableConfig); } const { cache } = this;