Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis committed Jan 8, 2025
1 parent 4b4cecc commit dd954fe
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions libs/langchain-groq/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -723,7 +717,7 @@ export class ChatGroq extends BaseChatModel<
}
const defaultHeaders = {
"User-Agent": "langchainjs",
...(fields?.defaultHeaders || {}),
...(fields?.defaultHeaders ?? {}),
};

this.client = new Groq({
Expand All @@ -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,
});
Expand Down

0 comments on commit dd954fe

Please sign in to comment.