Skip to content

Commit

Permalink
Fix broken fetch usage for CFW (langchain-ai#3302)
Browse files Browse the repository at this point in the history
  • Loading branch information
dqbd authored Nov 16, 2023
1 parent b9e9202 commit 7538d6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion langchain/src/chat_models/bedrock/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class BedrockChat extends SimpleChatModel implements BaseBedrockInput {

this.temperature = fields?.temperature ?? this.temperature;
this.maxTokens = fields?.maxTokens ?? this.maxTokens;
this.fetchFn = fields?.fetchFn ?? fetch;
this.fetchFn = fields?.fetchFn ?? fetch.bind(globalThis);
this.endpointHost = fields?.endpointHost ?? fields?.endpointUrl;
this.stopSequences = fields?.stopSequences;
this.modelKwargs = fields?.modelKwargs;
Expand Down
2 changes: 1 addition & 1 deletion langchain/src/llms/bedrock/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class Bedrock extends LLM implements BaseBedrockInput {

this.temperature = fields?.temperature ?? this.temperature;
this.maxTokens = fields?.maxTokens ?? this.maxTokens;
this.fetchFn = fields?.fetchFn ?? fetch;
this.fetchFn = fields?.fetchFn ?? fetch.bind(globalThis);
this.endpointHost = fields?.endpointHost ?? fields?.endpointUrl;
this.stopSequences = fields?.stopSequences;
this.modelKwargs = fields?.modelKwargs;
Expand Down

0 comments on commit 7538d6f

Please sign in to comment.