extract-webpage 1.2.35 → 1.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extract-webpage.cjs.js.map +1 -1
- package/dist/extract-webpage.es.js.map +1 -1
- package/package.json +4 -4
- package/src/fs-mock.js +22 -22
- package/src/html-to-cite/extract-date/extract-date.ts +1049 -1049
- package/src/html-to-content/extract-content/extract-selectors-per-domain.json +3452 -3452
- package/src/search/index.ts +45 -45
- package/src/search/meta-search-agent-reexport.ts +38 -38
- package/src/search/url-to-html.ts +278 -278
- package/src/seektopic/seektopic-keyphrases.ts +279 -279
- package/src/suggest-next-words/autocomplete-search-engines.ts +435 -435
- package/src/url-to-content/.fuse_hidden003bd28a0000000d +332 -332
- package/src/url-to-content/url-to-content.ts +367 -367
- package/src/url-to-content/url-to-html.ts +436 -436
- package/src/utils/grab.ts +51 -51
package/src/search/index.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module extract-webpage/search
|
|
3
|
-
* @description Re-exports MetaSearchAgent from agent-toolkit with search functions
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { createSearchHandlers } from "chat-agent-toolkit";
|
|
7
|
-
import { searchSearxng } from "./public-searxng";
|
|
8
|
-
import { searchTavily, isTavilyConfigured } from "./tavily";
|
|
9
|
-
import { scrapeURL } from "./url-to-html";
|
|
10
|
-
import { getDocumentsFromLinks } from "../utils/documents";
|
|
11
|
-
|
|
12
|
-
// Export search handlers with actual search functions
|
|
13
|
-
export const searchHandlers = createSearchHandlers({
|
|
14
|
-
searchSearxng,
|
|
15
|
-
searchTavily,
|
|
16
|
-
isTavilyConfigured,
|
|
17
|
-
scrapeURL,
|
|
18
|
-
getDocumentsFromLinks,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// Re-export everything from agent-toolkit for convenience
|
|
22
|
-
export {
|
|
23
|
-
MetaSearchAgent,
|
|
24
|
-
generateSuggestions,
|
|
25
|
-
groupAndSummarizeDocs,
|
|
26
|
-
buildFallbackDocs,
|
|
27
|
-
rerankDocs,
|
|
28
|
-
processDocs,
|
|
29
|
-
normalizeSourcesOutput,
|
|
30
|
-
registerUploadFileLoader,
|
|
31
|
-
splitTextIntoChunks,
|
|
32
|
-
LineOutputParser,
|
|
33
|
-
LineListOutputParser,
|
|
34
|
-
formatChatHistoryAsString,
|
|
35
|
-
} from "chat-agent-toolkit";
|
|
36
|
-
|
|
37
|
-
export type {
|
|
38
|
-
UploadFileLoader,
|
|
39
|
-
MetaSearchAgentType,
|
|
40
|
-
Config,
|
|
41
|
-
ChatTurnMessage,
|
|
42
|
-
SearchingEvent,
|
|
43
|
-
FewShotExample,
|
|
44
|
-
Document,
|
|
45
|
-
} from "chat-agent-toolkit";
|
|
1
|
+
/**
|
|
2
|
+
* @module extract-webpage/search
|
|
3
|
+
* @description Re-exports MetaSearchAgent from agent-toolkit with search functions
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { createSearchHandlers } from "chat-agent-toolkit";
|
|
7
|
+
import { searchSearxng } from "./public-searxng";
|
|
8
|
+
import { searchTavily, isTavilyConfigured } from "./tavily";
|
|
9
|
+
import { scrapeURL } from "./url-to-html";
|
|
10
|
+
import { getDocumentsFromLinks } from "../utils/documents";
|
|
11
|
+
|
|
12
|
+
// Export search handlers with actual search functions
|
|
13
|
+
export const searchHandlers = createSearchHandlers({
|
|
14
|
+
searchSearxng,
|
|
15
|
+
searchTavily,
|
|
16
|
+
isTavilyConfigured,
|
|
17
|
+
scrapeURL,
|
|
18
|
+
getDocumentsFromLinks,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Re-export everything from agent-toolkit for convenience
|
|
22
|
+
export {
|
|
23
|
+
MetaSearchAgent,
|
|
24
|
+
generateSuggestions,
|
|
25
|
+
groupAndSummarizeDocs,
|
|
26
|
+
buildFallbackDocs,
|
|
27
|
+
rerankDocs,
|
|
28
|
+
processDocs,
|
|
29
|
+
normalizeSourcesOutput,
|
|
30
|
+
registerUploadFileLoader,
|
|
31
|
+
splitTextIntoChunks,
|
|
32
|
+
LineOutputParser,
|
|
33
|
+
LineListOutputParser,
|
|
34
|
+
formatChatHistoryAsString,
|
|
35
|
+
} from "chat-agent-toolkit";
|
|
36
|
+
|
|
37
|
+
export type {
|
|
38
|
+
UploadFileLoader,
|
|
39
|
+
MetaSearchAgentType,
|
|
40
|
+
Config,
|
|
41
|
+
ChatTurnMessage,
|
|
42
|
+
SearchingEvent,
|
|
43
|
+
FewShotExample,
|
|
44
|
+
Document,
|
|
45
|
+
} from "chat-agent-toolkit";
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Re-exports MetaSearchAgent from chat-agent-toolkit
|
|
3
|
-
* @deprecated Import from 'chat-agent-toolkit' instead
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
MetaSearchAgent as default,
|
|
8
|
-
searchHandlers,
|
|
9
|
-
generateSuggestions,
|
|
10
|
-
groupAndSummarizeDocs,
|
|
11
|
-
buildFallbackDocs,
|
|
12
|
-
rerankDocs,
|
|
13
|
-
processDocs,
|
|
14
|
-
normalizeSourcesOutput,
|
|
15
|
-
splitTextIntoChunks,
|
|
16
|
-
} from "chat-agent-toolkit";
|
|
17
|
-
|
|
18
|
-
export type {
|
|
19
|
-
MetaSearchAgentType,
|
|
20
|
-
Config,
|
|
21
|
-
ChatTurnMessage,
|
|
22
|
-
SearchingEvent,
|
|
23
|
-
FewShotExample,
|
|
24
|
-
Document,
|
|
25
|
-
} from "chat-agent-toolkit";
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
LineOutputParser,
|
|
29
|
-
LineListOutputParser,
|
|
30
|
-
formatChatHistoryAsString,
|
|
31
|
-
} from "chat-agent-toolkit";
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
webSearchResponsePrompt,
|
|
35
|
-
webSearchRetrieverPrompt,
|
|
36
|
-
webSearchRetrieverFewShots,
|
|
37
|
-
writingAssistantPrompt,
|
|
38
|
-
} from "chat-agent-toolkit";
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Re-exports MetaSearchAgent from chat-agent-toolkit
|
|
3
|
+
* @deprecated Import from 'chat-agent-toolkit' instead
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
MetaSearchAgent as default,
|
|
8
|
+
searchHandlers,
|
|
9
|
+
generateSuggestions,
|
|
10
|
+
groupAndSummarizeDocs,
|
|
11
|
+
buildFallbackDocs,
|
|
12
|
+
rerankDocs,
|
|
13
|
+
processDocs,
|
|
14
|
+
normalizeSourcesOutput,
|
|
15
|
+
splitTextIntoChunks,
|
|
16
|
+
} from "chat-agent-toolkit";
|
|
17
|
+
|
|
18
|
+
export type {
|
|
19
|
+
MetaSearchAgentType,
|
|
20
|
+
Config,
|
|
21
|
+
ChatTurnMessage,
|
|
22
|
+
SearchingEvent,
|
|
23
|
+
FewShotExample,
|
|
24
|
+
Document,
|
|
25
|
+
} from "chat-agent-toolkit";
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
LineOutputParser,
|
|
29
|
+
LineListOutputParser,
|
|
30
|
+
formatChatHistoryAsString,
|
|
31
|
+
} from "chat-agent-toolkit";
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
webSearchResponsePrompt,
|
|
35
|
+
webSearchRetrieverPrompt,
|
|
36
|
+
webSearchRetrieverFewShots,
|
|
37
|
+
writingAssistantPrompt,
|
|
38
|
+
} from "chat-agent-toolkit";
|