From dd954fe703e1e2e5951b3945b940826f95e14cf5 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Wed, 8 Jan 2025 15:33:41 -0800 Subject: [PATCH] x --- libs/langchain-groq/src/chat_models.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libs/langchain-groq/src/chat_models.ts b/libs/langchain-groq/src/chat_models.ts index 775c8e55b7b0..488f36280de4 100644 --- a/libs/langchain-groq/src/chat_models.ts +++ b/libs/langchain-groq/src/chat_models.ts @@ -138,12 +138,6 @@ export interface ChatGroqInput extends BaseChatModelParams { // eslint-disable-next-line @typescript-eslint/no-explicit-any fetch?: (...args: any) => any; - /** - * Maximum number of retry attempts - * @default 2 - */ - maxRetries?: number; - /** * Default headers included with every request */ @@ -723,7 +717,7 @@ export class ChatGroq extends BaseChatModel< } const defaultHeaders = { "User-Agent": "langchainjs", - ...(fields?.defaultHeaders || {}), + ...(fields?.defaultHeaders ?? {}), }; this.client = new Groq({ @@ -733,7 +727,7 @@ export class ChatGroq extends BaseChatModel< timeout: fields?.timeout, httpAgent: fields?.httpAgent, fetch: fields?.fetch, - maxRetries: fields?.maxRetries, + maxRetries: 0, defaultHeaders, defaultQuery: fields?.defaultQuery, });