only_ever_generator 8.4.3 → 8.4.4
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/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +69 -69
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
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
|
-
});
|
|
2
|
+
// import express from "express";
|
|
3
|
+
// import { OnlyEverGenerator } from "./bootstrap/app";
|
|
4
|
+
// import { ObjectId } from "mongodb";
|
|
5
|
+
// import { setUpMongoClient } from "./helper/mongo_helper";
|
|
6
|
+
// import { GenerationVariablesSchema } from "./types/generation_variables_schema";
|
|
7
|
+
// import { defaultGenerationVariables } from "./constants/default_generation_variables";
|
|
8
|
+
// export { OnlyEverGenerator };
|
|
9
|
+
// const app = express();
|
|
10
|
+
// app.get("/generate", async (req, res) => {
|
|
11
|
+
// const source = new ObjectId("692837542bd1597ff832d383");
|
|
12
|
+
// // setUp();
|
|
13
|
+
// const database = await setUpMongoClient();
|
|
14
|
+
// const openAiKey = process.env.OPEN_AI_KEY;
|
|
15
|
+
// const document = await database
|
|
16
|
+
// .collection("_source")
|
|
17
|
+
// .findOne({ _id: source });
|
|
18
|
+
// if (!document) {
|
|
19
|
+
// return res.status(404).json({ error: "Source not found" });
|
|
20
|
+
// }
|
|
21
|
+
// const promptIdForClassify =
|
|
22
|
+
// "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594";
|
|
23
|
+
// const promptIdForConceptFacts =
|
|
24
|
+
// "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8";
|
|
25
|
+
// const promptIdForCardGeneration =
|
|
26
|
+
// "pmpt_688118a923e4819098176a13a2f401920d2ea17d881cc6c6";
|
|
27
|
+
// const promptIdForMissingConceptsFacts =
|
|
28
|
+
// "pmpt_687ab50298dc8194b214804999d23df10e03b855371691f9";
|
|
29
|
+
// const promptIdForSummarize =
|
|
30
|
+
// "pmpt_6902c30a973481968395935cc6dfa78605f50d2b01d4afbd";
|
|
31
|
+
// // const generationCurriculum = process.env.GENERATION_CURRICULUM;
|
|
32
|
+
// const n = process.env.N;
|
|
33
|
+
// const generationContent = {
|
|
34
|
+
// content: {
|
|
35
|
+
// source_id: document.source_id,
|
|
36
|
+
// title: document.title,
|
|
37
|
+
// headings: document.headings,
|
|
38
|
+
// content: document.content,
|
|
39
|
+
// fields: [],
|
|
40
|
+
// taxonomy: {
|
|
41
|
+
// concepts_facts: document.concepts_facts ?? [],
|
|
42
|
+
// fields: document.fields ?? [],
|
|
43
|
+
// summary_cards: document.summary_cards ?? [],
|
|
44
|
+
// learn_value: document.learn_value,
|
|
45
|
+
// },
|
|
46
|
+
// type: document.type,
|
|
47
|
+
// },
|
|
48
|
+
// };
|
|
49
|
+
// const generationVariablesSchema: GenerationVariablesSchema =
|
|
50
|
+
// defaultGenerationVariables;
|
|
51
|
+
// const generator = new OnlyEverGenerator(
|
|
52
|
+
// openAiKey ?? "",
|
|
53
|
+
// "gpt-4o-mini",
|
|
54
|
+
// generationContent,
|
|
55
|
+
// generationVariablesSchema,
|
|
56
|
+
// false,
|
|
57
|
+
// 1
|
|
58
|
+
// );
|
|
59
|
+
// const response = await generator.generate(true, true, [
|
|
60
|
+
// "cloze",
|
|
61
|
+
// "mcq",
|
|
62
|
+
// "flash",
|
|
63
|
+
// "match",
|
|
64
|
+
// ]);
|
|
65
|
+
// console.log("Close");
|
|
66
|
+
// res.json(response);
|
|
67
|
+
// });
|
|
68
|
+
// app.listen(3000, () => {
|
|
69
|
+
// console.log("Server is running on port 3000");
|
|
70
|
+
// });
|
|
72
71
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,uDAAuD;AACvD,sCAAsC;AACtC,4DAA4D;AAC5D,mFAAmF;AACnF,yFAAyF;AAEzF,gCAAgC;AAEhC,yBAAyB;AAEzB,6CAA6C;AAC7C,6DAA6D;AAC7D,kBAAkB;AAClB,+CAA+C;AAC/C,+CAA+C;AAC/C,oCAAoC;AACpC,6BAA6B;AAC7B,iCAAiC;AACjC,qBAAqB;AACrB,kEAAkE;AAClE,MAAM;AACN,gCAAgC;AAChC,+DAA+D;AAC/D,oCAAoC;AACpC,+DAA+D;AAC/D,sCAAsC;AACtC,+DAA+D;AAC/D,4CAA4C;AAC5C,+DAA+D;AAC/D,iCAAiC;AACjC,+DAA+D;AAC/D,yEAAyE;AACzE,6BAA6B;AAC7B,gCAAgC;AAChC,iBAAiB;AACjB,uCAAuC;AACvC,+BAA+B;AAC/B,qCAAqC;AACrC,mCAAmC;AACnC,oBAAoB;AACpB,oBAAoB;AACpB,yDAAyD;AACzD,yCAAyC;AACzC,uDAAuD;AACvD,6CAA6C;AAC7C,WAAW;AACX,6BAA6B;AAC7B,SAAS;AACT,OAAO;AACP,iEAAiE;AACjE,kCAAkC;AAClC,6CAA6C;AAC7C,uBAAuB;AACvB,qBAAqB;AACrB,yBAAyB;AACzB,iCAAiC;AACjC,aAAa;AACb,QAAQ;AACR,OAAO;AACP,4DAA4D;AAC5D,eAAe;AACf,aAAa;AACb,eAAe;AACf,eAAe;AACf,QAAQ;AACR,0BAA0B;AAC1B,wBAAwB;AACxB,MAAM;AAEN,2BAA2B;AAC3B,mDAAmD;AACnD,MAAM"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import express from "express";
|
|
2
|
-
import { OnlyEverGenerator } from "./bootstrap/app";
|
|
3
|
-
import { ObjectId } from "mongodb";
|
|
4
|
-
import { setUpMongoClient } from "./helper/mongo_helper";
|
|
5
|
-
import { GenerationVariablesSchema } from "./types/generation_variables_schema";
|
|
6
|
-
import { defaultGenerationVariables } from "./constants/default_generation_variables";
|
|
1
|
+
// import express from "express";
|
|
2
|
+
// import { OnlyEverGenerator } from "./bootstrap/app";
|
|
3
|
+
// import { ObjectId } from "mongodb";
|
|
4
|
+
// import { setUpMongoClient } from "./helper/mongo_helper";
|
|
5
|
+
// import { GenerationVariablesSchema } from "./types/generation_variables_schema";
|
|
6
|
+
// import { defaultGenerationVariables } from "./constants/default_generation_variables";
|
|
7
7
|
|
|
8
|
-
export { OnlyEverGenerator };
|
|
8
|
+
// export { OnlyEverGenerator };
|
|
9
9
|
|
|
10
|
-
const app = express();
|
|
10
|
+
// const app = express();
|
|
11
11
|
|
|
12
|
-
app.get("/generate", async (req, res) => {
|
|
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
|
-
});
|
|
12
|
+
// app.get("/generate", async (req, res) => {
|
|
13
|
+
// const source = new ObjectId("692837542bd1597ff832d383");
|
|
14
|
+
// // setUp();
|
|
15
|
+
// const database = await setUpMongoClient();
|
|
16
|
+
// const openAiKey = process.env.OPEN_AI_KEY;
|
|
17
|
+
// const document = await database
|
|
18
|
+
// .collection("_source")
|
|
19
|
+
// .findOne({ _id: source });
|
|
20
|
+
// if (!document) {
|
|
21
|
+
// return res.status(404).json({ error: "Source not found" });
|
|
22
|
+
// }
|
|
23
|
+
// const promptIdForClassify =
|
|
24
|
+
// "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594";
|
|
25
|
+
// const promptIdForConceptFacts =
|
|
26
|
+
// "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8";
|
|
27
|
+
// const promptIdForCardGeneration =
|
|
28
|
+
// "pmpt_688118a923e4819098176a13a2f401920d2ea17d881cc6c6";
|
|
29
|
+
// const promptIdForMissingConceptsFacts =
|
|
30
|
+
// "pmpt_687ab50298dc8194b214804999d23df10e03b855371691f9";
|
|
31
|
+
// const promptIdForSummarize =
|
|
32
|
+
// "pmpt_6902c30a973481968395935cc6dfa78605f50d2b01d4afbd";
|
|
33
|
+
// // const generationCurriculum = process.env.GENERATION_CURRICULUM;
|
|
34
|
+
// const n = process.env.N;
|
|
35
|
+
// const generationContent = {
|
|
36
|
+
// content: {
|
|
37
|
+
// source_id: document.source_id,
|
|
38
|
+
// title: document.title,
|
|
39
|
+
// headings: document.headings,
|
|
40
|
+
// content: document.content,
|
|
41
|
+
// fields: [],
|
|
42
|
+
// taxonomy: {
|
|
43
|
+
// concepts_facts: document.concepts_facts ?? [],
|
|
44
|
+
// fields: document.fields ?? [],
|
|
45
|
+
// summary_cards: document.summary_cards ?? [],
|
|
46
|
+
// learn_value: document.learn_value,
|
|
47
|
+
// },
|
|
48
|
+
// type: document.type,
|
|
49
|
+
// },
|
|
50
|
+
// };
|
|
51
|
+
// const generationVariablesSchema: GenerationVariablesSchema =
|
|
52
|
+
// defaultGenerationVariables;
|
|
53
|
+
// const generator = new OnlyEverGenerator(
|
|
54
|
+
// openAiKey ?? "",
|
|
55
|
+
// "gpt-4o-mini",
|
|
56
|
+
// generationContent,
|
|
57
|
+
// generationVariablesSchema,
|
|
58
|
+
// false,
|
|
59
|
+
// 1
|
|
60
|
+
// );
|
|
61
|
+
// const response = await generator.generate(true, true, [
|
|
62
|
+
// "cloze",
|
|
63
|
+
// "mcq",
|
|
64
|
+
// "flash",
|
|
65
|
+
// "match",
|
|
66
|
+
// ]);
|
|
67
|
+
// console.log("Close");
|
|
68
|
+
// res.json(response);
|
|
69
|
+
// });
|
|
70
70
|
|
|
71
|
-
app.listen(3000, () => {
|
|
72
|
-
|
|
73
|
-
});
|
|
71
|
+
// app.listen(3000, () => {
|
|
72
|
+
// console.log("Server is running on port 3000");
|
|
73
|
+
// });
|