Skip to content

Commit f3585eb

Browse files
versolexujingzhubracesproul
authored
community[patch]: cheerio loader fetch headers type error (#5905)
* fix: cheerio loader fetch headers type error * fix ci --------- Co-authored-by: xujingzhu <[email protected]> Co-authored-by: Brace Sproul <[email protected]>
1 parent ea1c763 commit f3585eb

File tree

1 file changed

+4
-4
lines changed
  • libs/langchain-community/src/document_loaders/web

1 file changed

+4
-4
lines changed

libs/langchain-community/src/document_loaders/web/cheerio.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface WebBaseLoaderParams extends AsyncCallerParams {
3636
/**
3737
* The headers to use in the fetch request.
3838
*/
39-
headers?: Headers;
39+
headers?: HeadersInit;
4040
}
4141

4242
/**
@@ -62,7 +62,7 @@ export class CheerioWebBaseLoader
6262

6363
textDecoder?: TextDecoder;
6464

65-
headers?: Headers;
65+
headers?: HeadersInit;
6666

6767
constructor(public webPath: string, fields?: WebBaseLoaderParams) {
6868
super();
@@ -86,7 +86,7 @@ export class CheerioWebBaseLoader
8686
timeout: number | undefined,
8787
textDecoder?: TextDecoder,
8888
options?: CheerioOptions & {
89-
headers?: Headers;
89+
headers?: HeadersInit;
9090
}
9191
): Promise<CheerioAPI[]> {
9292
return Promise.all(
@@ -102,7 +102,7 @@ export class CheerioWebBaseLoader
102102
timeout: number | undefined,
103103
textDecoder?: TextDecoder,
104104
options?: CheerioOptions & {
105-
headers?: Headers;
105+
headers?: HeadersInit;
106106
}
107107
): Promise<CheerioAPI> {
108108
const { headers, ...cheerioOptions } = options ?? {};

0 commit comments

Comments
 (0)