-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.js
115 lines (90 loc) · 3.88 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import { searchWeb } from "./src/search/search-web.js";
import { searchSTREAM } from "./src/search/search-stream.js";
import { extractContent } from "./src/extractor/url-to-content/url-to-content.js";
import { scrapeURL } from "./src/extractor/url-to-content/scrape-url.js";
import { extractSEEKTOPIC } from "./src/topics/seektopic-keyphrases.js";
import { weighRelevanceConceptVectorAPI } from "./src/similarity/similarity-remote-api.js";
import { convertLanguageReplyToJSON } from "./src/generate/languagereply-to-json.js";
import {
convertHTMLSpecialChars,
convertMarkdownToHTML,
copyHTMLToClipboard,
convertURLToAbsoluteURL,
convertMathLaTexToImage,
} from "./src/extractor/html-to-content/html-utils.js";
import { convertYoutubeToText } from "./src/extractor/url-to-content/youtube-to-text.js";
import { convertPDFToHTML } from "./src/extractor/url-to-content/pdf-to-content.js";
import { extractTopicTermGroupsLDA } from "./src/topics/topic-distribution.js";
import { weighSimilarityByCharacter } from "./src/match/compare-letters.js";
import { suggestNextWordCompletions } from "./src/tokenize/suggest-complete-word.js";
import { convertTextToTokens } from "./src/tokenize/text-to-topic-tokens.js";
import { splitSentences } from "./src/tokenize/sentences.js";
import { splitTextSemanticChars } from "./src/tokenize/text-to-chunks.js";
import { searchWikipedia } from "./src/search/search-wikipedia.js";
import { matchQUASAR } from "./src/match/match-quasar.js";
import { weighRelevanceTermFrequency } from "./src/match/weigh-relevance-frequency.js";
import { convertEmbeddingsToUMAP } from "./src/similarity/embeddings-to-graph.js";
import {
addEmbeddingVectorsToIndex,
searchVectorIndex,
getAllEmbeddings,
convertTextToEmbedding,
getEmbeddingModel,
exportEmbeddingsIndex,
importVectorIndexFromString,
} from "./src/similarity/similarity-vector.js";
import { convertDOCXToHTML } from "./src/extractor/url-to-content/docx-to-content.js";
import { extractMainContentFromHTML } from "./src/extractor/html-to-content/extract-content/extractor1-content.js";
import { extractMainContentFromHTML2 } from "./src/extractor/html-to-content/extract-content/extractor2-content.js";
import { convertHTMLToBasicHTML } from "./src/extractor/html-to-content/html-to-basic-html.js";
import { extractCite } from "./src/extractor/html-to-cite/extract-cite.js";
import { stemWordToRoot } from "./src/tokenize/word-to-root-stem.js";
import { extractFavicon } from "./src/extractor/html-to-cite/url-to-favicon.js";
import { embedYoutubePlayer } from "./src/interface/youtube-embed.js";
import { generateLanguageModelReply } from "./src/generate/generate-reply-api.js";
// import {compileTopicModel} from "./src/dataset-import/compile-topic-model.js"
// import { torch } from "./src/train/neural-net.js";
// gpu.js needs bun compatibility
// Export all functions as named exports
export {
generateLanguageModelReply,
convertMarkdownToHTML,
importVectorIndexFromString,
convertHTMLSpecialChars,
convertPDFToHTML,
extractContent,
extractFavicon,
embedYoutubePlayer,
stemWordToRoot,
copyHTMLToClipboard,
convertMathLaTexToImage,
extractCite,
convertDOCXToHTML,
convertLanguageReplyToJSON,
extractMainContentFromHTML,
extractMainContentFromHTML2,
convertHTMLToBasicHTML,
exportEmbeddingsIndex,
addEmbeddingVectorsToIndex,
convertEmbeddingsToUMAP,
convertTextToEmbedding,
convertTextToTokens,
convertYoutubeToText,
extractSEEKTOPIC,
getAllEmbeddings,
getEmbeddingModel,
matchQUASAR,
scrapeURL,
searchSTREAM,
searchWeb,
searchWikipedia,
searchVectorIndex,
splitSentences,
splitTextSemanticChars,
// torch,
suggestNextWordCompletions,
weighSimilarityByCharacter,
weighRelevanceConceptVectorAPI,
weighRelevanceTermFrequency,
extractTopicTermGroupsLDA,
};