only_ever_generator 8.4.0 → 8.4.3
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/bootstrap/app.d.ts +3 -6
- package/dist/bootstrap/app.d.ts.map +1 -1
- package/dist/bootstrap/app.js +17 -11
- package/dist/bootstrap/app.js.map +1 -1
- package/dist/card_gen/generate_cards.d.ts +3 -2
- package/dist/card_gen/generate_cards.d.ts.map +1 -1
- package/dist/card_gen/generate_cards.js +14 -8
- package/dist/card_gen/generate_cards.js.map +1 -1
- package/dist/constants/default_generation_variables.d.ts +3 -0
- package/dist/constants/default_generation_variables.d.ts.map +1 -0
- package/dist/constants/default_generation_variables.js +580 -0
- package/dist/constants/default_generation_variables.js.map +1 -0
- package/dist/helper/schema_helper/build_card_schema.d.ts +9 -1
- package/dist/helper/schema_helper/build_card_schema.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_card_schema.js +50 -47
- package/dist/helper/schema_helper/build_card_schema.js.map +1 -1
- package/dist/helper/schema_helper/build_concept_facts_schema.d.ts +1 -1
- package/dist/helper/schema_helper/build_concept_facts_schema.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_concept_facts_schema.js +5 -20
- package/dist/helper/schema_helper/build_concept_facts_schema.js.map +1 -1
- package/dist/helper/schema_helper/build_summary_schema.d.ts +1 -1
- package/dist/helper/schema_helper/build_summary_schema.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_summary_schema.js +7 -18
- package/dist/helper/schema_helper/build_summary_schema.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -62
- package/dist/index.js.map +1 -1
- package/dist/services/get_prompts.d.ts +7 -8
- package/dist/services/get_prompts.d.ts.map +1 -1
- package/dist/services/get_prompts.js +21 -69
- package/dist/services/get_prompts.js.map +1 -1
- package/dist/services/prompts_test.d.ts +10 -0
- package/dist/services/prompts_test.d.ts.map +1 -0
- package/dist/services/prompts_test.js +227 -0
- package/dist/services/prompts_test.js.map +1 -0
- package/dist/types/generation_variables_schema.d.ts +14 -0
- package/dist/types/generation_variables_schema.d.ts.map +1 -0
- package/dist/types/generation_variables_schema.js +3 -0
- package/dist/types/generation_variables_schema.js.map +1 -0
- package/dist/typology_gen/generate_concept_facts.d.ts +3 -2
- package/dist/typology_gen/generate_concept_facts.d.ts.map +1 -1
- package/dist/typology_gen/generate_concept_facts.js +7 -4
- package/dist/typology_gen/generate_concept_facts.js.map +1 -1
- package/dist/typology_gen/generate_typology.d.ts +1 -2
- package/dist/typology_gen/generate_typology.d.ts.map +1 -1
- package/dist/typology_gen/generate_typology.js +3 -3
- package/dist/typology_gen/generate_typology.js.map +1 -1
- package/dist/typology_gen/summarize.d.ts +3 -2
- package/dist/typology_gen/summarize.d.ts.map +1 -1
- package/dist/typology_gen/summarize.js +6 -4
- package/dist/typology_gen/summarize.js.map +1 -1
- package/dist/utils/test.d.ts +2 -0
- package/dist/utils/test.d.ts.map +1 -0
- package/dist/utils/test.js +5 -0
- package/dist/utils/test.js.map +1 -0
- package/package.json +1 -1
- package/src/bootstrap/app.ts +21 -23
- package/src/card_gen/generate_cards.ts +25 -12
- package/src/constants/default_generation_variables.ts +624 -0
- package/src/helper/schema_helper/build_card_schema.ts +73 -49
- package/src/helper/schema_helper/build_concept_facts_schema.ts +4 -18
- package/src/helper/schema_helper/build_summary_schema.ts +6 -17
- package/src/index.ts +65 -63
- package/src/services/get_prompts.ts +22 -74
- package/src/types/generation_variables_schema.ts +16 -0
- package/src/typology_gen/generate_concept_facts.ts +10 -7
- package/src/typology_gen/generate_typology.ts +2 -4
- package/src/typology_gen/summarize.ts +9 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default_generation_variables.js","sourceRoot":"","sources":["../../src/constants/default_generation_variables.ts"],"names":[],"mappings":";;;AAEa,QAAA,0BAA0B,GAA8B;IACnE,kBAAkB,EAChB,61BAA61B;IAC/1B,aAAa,EAAE;QACb,OAAO,EAAE;YACP,IAAI,EA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,KAAK,EAAE;4DACL,IAAI,EAAE,QAAQ;4DACd,SAAS,EAAE,EAAE;yDACd;qDACF;oDACD,iBAAiB,EAAE;wDACjB,IAAI,EAAE,OAAO;wDACb,QAAQ,EAAE,CAAC;wDACX,QAAQ,EAAE,CAAC;wDACX,WAAW,EACT,+NAA+N;wDACjO,KAAK,EAAE;4DACL,IAAI,EAAE,QAAQ;4DACd,SAAS,EAAE,EAAE;yDACd;qDACF;iDACF;gDACD,QAAQ,EAAE;oDACR,QAAQ;oDACR,iBAAiB;oDACjB,mBAAmB;iDACpB;gDACD,oBAAoB,EAAE,KAAK;6CAC5B;yCACF;qCACF;oCACD,QAAQ,EAAE;wCACR,IAAI,EAAE,OAAO;wCACb,KAAK,EAAE;4CACL,IAAI,EAAE,QAAQ;4CACd,IAAI,EAAE,EAAE;yCACT;qCACF;oCACD,KAAK,EAAE;wCACL,IAAI,EAAE,OAAO;wCACb,KAAK,EAAE;4CACL,IAAI,EAAE,QAAQ;4CACd,IAAI,EAAE,EAAE;yCACT;qCACF;oCACD,eAAe,EAAE;wCACf,IAAI,EAAE,QAAQ;wCACd,SAAS,EAAE,GAAG;wCACd,WAAW,EACT,sEAAsE;qCACzE;iCACF;gCACD,QAAQ,EAAE;oCACR,MAAM;oCACN,cAAc;oCACd,UAAU;oCACV,OAAO;oCACP,iBAAiB;iCAClB;gCACD,oBAAoB,EAAE,KAAK;6BAC5B;yBACF;qBACF;oBACD,QAAQ,EAAE,CAAC,YAAY,CAAC;oBACxB,oBAAoB,EAAE,KAAK;iBAC5B;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Builds card output schema by populating the integrated schemas with concepts, facts, and card-specific schemas
|
|
3
|
+
* @param concepts - Array of concept strings
|
|
4
|
+
* @param facts - Array of fact strings
|
|
5
|
+
* @param card_generation_types - Array of card types to generate (e.g., ["flash", "mcq", "cloze"])
|
|
6
|
+
* @param cardTypeSchemas - Object mapping card types to their integrated schemas from getPrompts (e.g., { flash: {...}, mcq: {...} })
|
|
7
|
+
* @returns Populated schema object ready for use
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildCardSchema: (concepts: string[], facts: string[], card_generation_types: string[], cardTypeSchemas: Record<string, any>) => Promise<any>;
|
|
2
10
|
//# sourceMappingURL=build_card_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_card_schema.d.ts","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_card_schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build_card_schema.d.ts","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_card_schema.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAAE,EAClB,OAAO,MAAM,EAAE,EACf,uBAAuB,MAAM,EAAE,EAC/B,iBAAiB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,iBAmFrC,CAAC"}
|
|
@@ -11,60 +11,63 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.buildCardSchema = void 0;
|
|
13
13
|
const sanitize_strings_1 = require("../../utils/sanitize_strings");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
throw new Error("Schema not found");
|
|
27
|
-
}
|
|
28
|
-
const schema = schemaObj.schema;
|
|
29
|
-
if (!schema) {
|
|
30
|
-
throw new Error("Schema not found");
|
|
14
|
+
/**
|
|
15
|
+
* Builds card output schema by populating the integrated schemas with concepts, facts, and card-specific schemas
|
|
16
|
+
* @param concepts - Array of concept strings
|
|
17
|
+
* @param facts - Array of fact strings
|
|
18
|
+
* @param card_generation_types - Array of card types to generate (e.g., ["flash", "mcq", "cloze"])
|
|
19
|
+
* @param cardTypeSchemas - Object mapping card types to their integrated schemas from getPrompts (e.g., { flash: {...}, mcq: {...} })
|
|
20
|
+
* @returns Populated schema object ready for use
|
|
21
|
+
*/
|
|
22
|
+
const buildCardSchema = (concepts, facts, card_generation_types, cardTypeSchemas) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
24
|
+
if (!cardTypeSchemas || Object.keys(cardTypeSchemas).length === 0) {
|
|
25
|
+
throw new Error("Card type schemas are required");
|
|
31
26
|
}
|
|
32
27
|
const conceptsSanitized = (0, sanitize_strings_1.sanitizeStringsForSchema)(concepts);
|
|
33
28
|
const factsSanitized = (0, sanitize_strings_1.sanitizeStringsForSchema)(facts);
|
|
34
|
-
//
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
// Use the first available card type schema as the base (all have the same base structure)
|
|
30
|
+
const firstCardType = card_generation_types.find((type) => cardTypeSchemas[type]);
|
|
31
|
+
if (!firstCardType) {
|
|
32
|
+
throw new Error("No valid card type schema found");
|
|
33
|
+
}
|
|
34
|
+
// Deep clone to avoid mutating the original
|
|
35
|
+
const populatedSchema = JSON.parse(JSON.stringify(cardTypeSchemas[firstCardType].schema));
|
|
36
|
+
// Populate concepts enum
|
|
37
|
+
if ((_g = (_f = (_e = (_d = (_c = (_b = (_a = populatedSchema.schema) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.test_cards) === null || _c === void 0 ? void 0 : _c.items) === null || _d === void 0 ? void 0 : _d.properties) === null || _e === void 0 ? void 0 : _e.concepts) === null || _f === void 0 ? void 0 : _f.items) === null || _g === void 0 ? void 0 : _g.enum) {
|
|
38
|
+
populatedSchema.schema.properties.test_cards.items.properties.concepts.items.enum =
|
|
39
|
+
conceptsSanitized;
|
|
40
|
+
}
|
|
41
|
+
// Populate facts enum
|
|
42
|
+
if ((_p = (_o = (_m = (_l = (_k = (_j = (_h = populatedSchema.schema) === null || _h === void 0 ? void 0 : _h.properties) === null || _j === void 0 ? void 0 : _j.test_cards) === null || _k === void 0 ? void 0 : _k.items) === null || _l === void 0 ? void 0 : _l.properties) === null || _m === void 0 ? void 0 : _m.facts) === null || _o === void 0 ? void 0 : _o.items) === null || _p === void 0 ? void 0 : _p.enum) {
|
|
43
|
+
populatedSchema.schema.properties.test_cards.items.properties.facts.items.enum =
|
|
44
|
+
factsSanitized;
|
|
45
|
+
}
|
|
46
|
+
// Replace the type enum with the requested card generation types
|
|
47
|
+
if ((_v = (_u = (_t = (_s = (_r = (_q = populatedSchema.schema) === null || _q === void 0 ? void 0 : _q.properties) === null || _r === void 0 ? void 0 : _r.test_cards) === null || _s === void 0 ? void 0 : _s.items) === null || _t === void 0 ? void 0 : _t.properties) === null || _u === void 0 ? void 0 : _u.type) === null || _v === void 0 ? void 0 : _v.enum) {
|
|
48
|
+
populatedSchema.schema.properties.test_cards.items.properties.type.enum =
|
|
49
|
+
card_generation_types;
|
|
50
|
+
}
|
|
51
|
+
// Extract card-specific schemas from the anyOf of each card type schema
|
|
52
|
+
const filteredCardTypeSchemas = [];
|
|
43
53
|
for (const cardType of card_generation_types) {
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
|
|
54
|
+
if (cardTypeSchemas[cardType]) {
|
|
55
|
+
const cardSchema = cardTypeSchemas[cardType];
|
|
56
|
+
// Extract the card-specific schema from the anyOf array
|
|
57
|
+
const cardContentSchema = (_2 = (_1 = (_0 = (_z = (_y = (_x = (_w = cardSchema.schema) === null || _w === void 0 ? void 0 : _w.properties) === null || _x === void 0 ? void 0 : _x.test_cards) === null || _y === void 0 ? void 0 : _y.items) === null || _z === void 0 ? void 0 : _z.properties) === null || _0 === void 0 ? void 0 : _0.card_content) === null || _1 === void 0 ? void 0 : _1.anyOf) === null || _2 === void 0 ? void 0 : _2[0];
|
|
58
|
+
if (cardContentSchema) {
|
|
59
|
+
filteredCardTypeSchemas.push(cardContentSchema);
|
|
50
60
|
}
|
|
51
61
|
}
|
|
52
62
|
}
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
card_generation_types;
|
|
62
|
-
// Replace anyOf array with individual schemas based on card type
|
|
63
|
-
if (Object.keys(cardTypeSchemas).length > 0) {
|
|
64
|
-
populatedSchema.schema.properties.test_cards.items.properties.card_content =
|
|
65
|
-
{
|
|
66
|
-
anyOf: Object.values(cardTypeSchemas),
|
|
67
|
-
};
|
|
63
|
+
// Replace anyOf array with all card-specific schemas
|
|
64
|
+
if (filteredCardTypeSchemas.length > 0) {
|
|
65
|
+
if ((_7 = (_6 = (_5 = (_4 = (_3 = populatedSchema.schema) === null || _3 === void 0 ? void 0 : _3.properties) === null || _4 === void 0 ? void 0 : _4.test_cards) === null || _5 === void 0 ? void 0 : _5.items) === null || _6 === void 0 ? void 0 : _6.properties) === null || _7 === void 0 ? void 0 : _7.card_content) {
|
|
66
|
+
populatedSchema.schema.properties.test_cards.items.properties.card_content =
|
|
67
|
+
{
|
|
68
|
+
anyOf: filteredCardTypeSchemas,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
68
71
|
}
|
|
69
72
|
console.log("Populated Schema", JSON.stringify(populatedSchema.schema.properties.test_cards.items, null, 2));
|
|
70
73
|
return populatedSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_card_schema.js","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_card_schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAwE;
|
|
1
|
+
{"version":3,"file":"build_card_schema.js","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_card_schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAwE;AAExE;;;;;;;GAOG;AACI,MAAM,eAAe,GAAG,CAC7B,QAAkB,EAClB,KAAe,EACf,qBAA+B,EAC/B,eAAoC,EACpC,EAAE;;IACF,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,iBAAiB,GAAG,IAAA,2CAAwB,EAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,cAAc,GAAG,IAAA,2CAAwB,EAAC,KAAK,CAAC,CAAC;IAEvD,0FAA0F;IAC1F,MAAM,aAAa,GAAG,qBAAqB,CAAC,IAAI,CAC9C,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAChC,CAAC;IACF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,4CAA4C;IAC5C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAChC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CACtD,CAAC;IAEF,yBAAyB;IACzB,IACE,MAAA,MAAA,MAAA,MAAA,MAAA,MAAA,MAAA,eAAe,CAAC,MAAM,0CAAE,UAAU,0CAAE,UAAU,0CAAE,KAAK,0CAAE,UAAU,0CAAE,QAAQ,0CACvE,KAAK,0CAAE,IAAI,EACf,CAAC;QACD,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI;YAC/E,iBAAiB,CAAC;IACtB,CAAC;IA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ACvC,IACE,MAAA,MAAA,MAAA,MAAA,MAAA,eAAe,CAAC,MAAM,0CAAE,UAAU,0CAAE,UAAU,0CAAE,KAAK,0CAAE,UAAU,0CAC7D,YAAY,EAChB,CAAC;YACD,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY;gBACxE;oBACE,KAAK,EAAE,uBAAuB;iBAC/B,CAAC;QACN,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CACT,kBAAkB,EAClB,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAC5E,CAAC;IAEF,OAAO,eAAe,CAAC;AACzB,CAAC,CAAA,CAAC;AAvFW,QAAA,eAAe,mBAuF1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function buildConceptFactSchema(headings: string[],
|
|
1
|
+
export declare function buildConceptFactSchema(headings: string[], conceptFactSchema: any): Promise<any>;
|
|
2
2
|
//# sourceMappingURL=build_concept_facts_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_concept_facts_schema.d.ts","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_concept_facts_schema.ts"],"names":[],"mappings":"AAKA,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAAE,EAClB,
|
|
1
|
+
{"version":3,"file":"build_concept_facts_schema.d.ts","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_concept_facts_schema.ts"],"names":[],"mappings":"AAKA,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAAE,EAClB,iBAAiB,EAAE,GAAG,gBAuBvB"}
|
|
@@ -10,30 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.buildConceptFactSchema = buildConceptFactSchema;
|
|
13
|
-
const mongodb_1 = require("mongodb");
|
|
14
|
-
const mongo_helper_1 = require("../mongo_helper");
|
|
15
13
|
const sanitize_strings_1 = require("../../utils/sanitize_strings");
|
|
16
14
|
// Function to populate enums in a parsed schema
|
|
17
|
-
function buildConceptFactSchema(
|
|
18
|
-
return __awaiter(this,
|
|
15
|
+
function buildConceptFactSchema(headings, conceptFactSchema) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
17
|
var _a, _b, _c, _d, _e, _f;
|
|
20
|
-
const
|
|
21
|
-
const objectId = new mongodb_1.ObjectId("6895ac4baa1cad73b0018061");
|
|
22
|
-
const schemaObj = yield database.collection("_prompts").findOne({
|
|
23
|
-
_id: objectId,
|
|
24
|
-
});
|
|
25
|
-
if (!schemaObj) {
|
|
26
|
-
throw new Error("Schema not found");
|
|
27
|
-
}
|
|
28
|
-
const schema = schemaObj.schema;
|
|
29
|
-
if (!schema) {
|
|
30
|
-
throw new Error("Schema not found");
|
|
31
|
-
}
|
|
32
|
-
// Deep clone to avoid mutating the original
|
|
33
|
-
const populatedSchema = JSON.parse(schema);
|
|
18
|
+
const populatedSchema = conceptFactSchema;
|
|
34
19
|
// Update name and strict mode
|
|
35
|
-
populatedSchema.name = name;
|
|
36
|
-
populatedSchema.strict = strict;
|
|
20
|
+
populatedSchema.name = conceptFactSchema.name;
|
|
21
|
+
populatedSchema.strict = conceptFactSchema.strict;
|
|
37
22
|
const allowedRefs = [...headings, ""];
|
|
38
23
|
// Sanitize headings to remove quotes for OpenAI structured outputs
|
|
39
24
|
const sanitizedStrings = (0, sanitize_strings_1.sanitizeStringsForSchema)(allowedRefs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_concept_facts_schema.js","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_concept_facts_schema.ts"],"names":[],"mappings":";;;;;;;;;;;AAKA,
|
|
1
|
+
{"version":3,"file":"build_concept_facts_schema.js","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_concept_facts_schema.ts"],"names":[],"mappings":";;;;;;;;;;;AAKA,wDAyBC;AA5BD,mEAAwE;AAExE,gDAAgD;AAChD,SAAsB,sBAAsB,CAC1C,QAAkB,EAClB,iBAAsB;;;QAEtB,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAE1C,8BAA8B;QAC9B,eAAe,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;QAC9C,eAAe,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;QAElD,MAAM,WAAW,GAAG,CAAC,GAAG,QAAQ,EAAE,EAAE,CAAC,CAAC;QAEtC,mEAAmE;QACnE,MAAM,gBAAgB,GAAG,IAAA,2CAAwB,EAAC,WAAW,CAAC,CAAC;QAE/D,gDAAgD;QAChD,IACE,MAAA,MAAA,MAAA,MAAA,MAAA,MAAA,eAAe,CAAC,MAAM,0CAAE,UAAU,0CAAE,cAAc,0CAAE,KAAK,0CAAE,UAAU,0CACjE,SAAS,0CAAE,IAAI,EACnB,CAAC;YACD,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI;gBAC9E,gBAAgB,CAAC;QACrB,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function buildSummarySchema(headings: string[],
|
|
1
|
+
export declare function buildSummarySchema(headings: string[], summarySchema: any): Promise<any>;
|
|
2
2
|
//# sourceMappingURL=build_summary_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_summary_schema.d.ts","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_summary_schema.ts"],"names":[],"mappings":"AAIA,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAAE,EAClB,
|
|
1
|
+
{"version":3,"file":"build_summary_schema.d.ts","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_summary_schema.ts"],"names":[],"mappings":"AAIA,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAAE,EAClB,aAAa,EAAE,GAAG,gBAyBnB"}
|
|
@@ -11,28 +11,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.buildSummarySchema = buildSummarySchema;
|
|
13
13
|
const sanitize_strings_1 = require("../../utils/sanitize_strings");
|
|
14
|
-
const mongo_helper_1 = require("../mongo_helper");
|
|
15
14
|
// Function to populate enums in a parsed schema
|
|
16
|
-
function buildSummarySchema(
|
|
17
|
-
return __awaiter(this,
|
|
15
|
+
function buildSummarySchema(headings, summarySchema) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
17
|
var _a, _b, _c, _d, _e, _f;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const schemaObj = yield database.collection("_prompts").findOne({
|
|
22
|
-
_id: objectId,
|
|
23
|
-
});
|
|
24
|
-
if (!schemaObj) {
|
|
25
|
-
throw new Error("Schema not found");
|
|
18
|
+
if (!summarySchema) {
|
|
19
|
+
return {};
|
|
26
20
|
}
|
|
27
|
-
const
|
|
28
|
-
if (!schema) {
|
|
29
|
-
throw new Error("Schema not found");
|
|
30
|
-
}
|
|
31
|
-
// Deep clone to avoid mutating the original
|
|
32
|
-
const populatedSchema = JSON.parse(schema);
|
|
21
|
+
const populatedSchema = summarySchema;
|
|
33
22
|
// Update name and strict mode
|
|
34
|
-
populatedSchema.name = name;
|
|
35
|
-
populatedSchema.strict = strict;
|
|
23
|
+
populatedSchema.name = summarySchema.name;
|
|
24
|
+
populatedSchema.strict = summarySchema.strict;
|
|
36
25
|
// Sanitize headings to remove quotes for OpenAI structured outputs
|
|
37
26
|
const sanitizedStrings = (0, sanitize_strings_1.sanitizeStringsForSchema)(headings);
|
|
38
27
|
// Type-safe enum population for reference field in summary_cards items
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_summary_schema.js","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_summary_schema.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"build_summary_schema.js","sourceRoot":"","sources":["../../../src/helper/schema_helper/build_summary_schema.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,gDA2BC;AA/BD,mEAAwE;AAGxE,gDAAgD;AAChD,SAAsB,kBAAkB,CACtC,QAAkB,EAClB,aAAkB;;;QAElB,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,eAAe,GAAG,aAAa,CAAC;QAEtC,8BAA8B;QAC9B,eAAe,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;QAC1C,eAAe,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;QAE9C,mEAAmE;QACnE,MAAM,gBAAgB,GAAG,IAAA,2CAAwB,EAAC,QAAQ,CAAC,CAAC;QAE5D,uEAAuE;QACvE,yDAAyD;QACzD,IACE,MAAA,MAAA,MAAA,MAAA,MAAA,MAAA,eAAe,CAAC,MAAM,0CAAE,UAAU,0CAAE,aAAa,0CAAE,KAAK,0CAAE,UAAU,0CAChE,SAAS,0CAAE,IAAI,EACnB,CAAC;YACD,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI;gBAC7E,gBAAgB,CAAC;QACrB,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CAAA"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMpD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,68 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
15
|
exports.OnlyEverGenerator = void 0;
|
|
16
|
+
const express_1 = __importDefault(require("express"));
|
|
4
17
|
const app_1 = require("./bootstrap/app");
|
|
5
18
|
Object.defineProperty(exports, "OnlyEverGenerator", { enumerable: true, get: function () { return app_1.OnlyEverGenerator; } });
|
|
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
|
-
// "flash",
|
|
60
|
-
// "match",
|
|
61
|
-
// ]);
|
|
62
|
-
// console.log("Close");
|
|
63
|
-
// res.json(response);
|
|
64
|
-
// });
|
|
65
|
-
// app.listen(3000, () => {
|
|
66
|
-
// console.log("Server is running on port 3000");
|
|
67
|
-
// });
|
|
19
|
+
const mongodb_1 = require("mongodb");
|
|
20
|
+
const mongo_helper_1 = require("./helper/mongo_helper");
|
|
21
|
+
const default_generation_variables_1 = require("./constants/default_generation_variables");
|
|
22
|
+
const app = (0, express_1.default)();
|
|
23
|
+
app.get("/generate", (req, res) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
var _a, _b, _c;
|
|
25
|
+
const source = new mongodb_1.ObjectId("692837542bd1597ff832d383");
|
|
26
|
+
// setUp();
|
|
27
|
+
const database = yield (0, mongo_helper_1.setUpMongoClient)();
|
|
28
|
+
const openAiKey = process.env.OPEN_AI_KEY;
|
|
29
|
+
const document = yield database
|
|
30
|
+
.collection("_source")
|
|
31
|
+
.findOne({ _id: source });
|
|
32
|
+
if (!document) {
|
|
33
|
+
return res.status(404).json({ error: "Source not found" });
|
|
34
|
+
}
|
|
35
|
+
const promptIdForClassify = "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594";
|
|
36
|
+
const promptIdForConceptFacts = "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8";
|
|
37
|
+
const promptIdForCardGeneration = "pmpt_688118a923e4819098176a13a2f401920d2ea17d881cc6c6";
|
|
38
|
+
const promptIdForMissingConceptsFacts = "pmpt_687ab50298dc8194b214804999d23df10e03b855371691f9";
|
|
39
|
+
const promptIdForSummarize = "pmpt_6902c30a973481968395935cc6dfa78605f50d2b01d4afbd";
|
|
40
|
+
// const generationCurriculum = process.env.GENERATION_CURRICULUM;
|
|
41
|
+
const n = process.env.N;
|
|
42
|
+
const generationContent = {
|
|
43
|
+
content: {
|
|
44
|
+
source_id: document.source_id,
|
|
45
|
+
title: document.title,
|
|
46
|
+
headings: document.headings,
|
|
47
|
+
content: document.content,
|
|
48
|
+
fields: [],
|
|
49
|
+
taxonomy: {
|
|
50
|
+
concepts_facts: (_a = document.concepts_facts) !== null && _a !== void 0 ? _a : [],
|
|
51
|
+
fields: (_b = document.fields) !== null && _b !== void 0 ? _b : [],
|
|
52
|
+
summary_cards: (_c = document.summary_cards) !== null && _c !== void 0 ? _c : [],
|
|
53
|
+
learn_value: document.learn_value,
|
|
54
|
+
},
|
|
55
|
+
type: document.type,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const generationVariablesSchema = default_generation_variables_1.defaultGenerationVariables;
|
|
59
|
+
const generator = new app_1.OnlyEverGenerator(openAiKey !== null && openAiKey !== void 0 ? openAiKey : "", "gpt-4o-mini", generationContent, generationVariablesSchema, false, 1);
|
|
60
|
+
const response = yield generator.generate(true, true, [
|
|
61
|
+
"cloze",
|
|
62
|
+
"mcq",
|
|
63
|
+
"flash",
|
|
64
|
+
"match",
|
|
65
|
+
]);
|
|
66
|
+
console.log("Close");
|
|
67
|
+
res.json(response);
|
|
68
|
+
}));
|
|
69
|
+
app.listen(3000, () => {
|
|
70
|
+
console.log("Server is running on port 3000");
|
|
71
|
+
});
|
|
68
72
|
//# 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":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,QAAQ,CAAC,QAAQ;YAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE;gBACR,cAAc,EAAE,MAAA,QAAQ,CAAC,cAAc,mCAAI,EAAE;gBAC7C,MAAM,EAAE,MAAA,QAAQ,CAAC,MAAM,mCAAI,EAAE;gBAC7B,aAAa,EAAE,MAAA,QAAQ,CAAC,aAAa,mCAAI,EAAE;gBAC3C,WAAW,EAAE,QAAQ,CAAC,WAAW;aAClC;YACD,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB;KACF,CAAC;IACF,MAAM,yBAAyB,GAC7B,yDAA0B,CAAC;IAC7B,MAAM,SAAS,GAAG,IAAI,uBAAiB,CACrC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,EACf,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,EACL,CAAC,CACF,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE;QACpD,OAAO;QACP,KAAK;QACL,OAAO;QACP,OAAO;KACR,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrB,CAAC,CAAA,CAAC,CAAC;AAEH,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IACpB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
export declare const promptIds: {
|
|
2
|
+
classify: string;
|
|
3
|
+
conceptFacts: string;
|
|
4
|
+
cardGeneration: string;
|
|
5
|
+
missingConceptsFacts: string;
|
|
6
|
+
summarize: string;
|
|
7
|
+
};
|
|
1
8
|
export declare const getPrompts: (sourceType: string, cardGenerationType: string[]) => Promise<{
|
|
2
|
-
typology: {
|
|
3
|
-
prompt: any;
|
|
4
|
-
ids: string[];
|
|
5
|
-
};
|
|
6
|
-
card_gen: {
|
|
7
|
-
prompt: any;
|
|
8
|
-
ids: string[];
|
|
9
|
-
};
|
|
10
9
|
card_instructions: any;
|
|
11
10
|
card_examples: any;
|
|
12
11
|
bloom_instructions: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_prompts.d.ts","sourceRoot":"","sources":["../../src/services/get_prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_prompts.d.ts","sourceRoot":"","sources":["../../src/services/get_prompts.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AAoBF,eAAO,MAAM,UAAU,GACrB,YAAY,MAAM,EAClB,oBAAoB,MAAM,EAAE;;;;EAiF7B,CAAC"}
|
|
@@ -9,40 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getPrompts = void 0;
|
|
12
|
+
exports.getPrompts = exports.promptIds = void 0;
|
|
13
13
|
const mongo_helper_1 = require("../helper/mongo_helper");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
concepts: "676529b759c0563f42607ae2",
|
|
21
|
-
facts: "67652b1659c0563f42607aea",
|
|
22
|
-
generate: "676529c259c0563f42607ae3",
|
|
23
|
-
summarize: "676529d259c0563f42607ae4",
|
|
24
|
-
};
|
|
25
|
-
const cardGenDocs = {
|
|
26
|
-
role: "676526c959c0563f42607ad4",
|
|
27
|
-
inputs: "676526c959c0563f42607ad5",
|
|
28
|
-
steps: "676526c959c0563f42607ad6",
|
|
29
|
-
schema: "676526c959c0563f42607ad7",
|
|
30
|
-
cloze: "6765270859c0563f42607ad8",
|
|
31
|
-
flash: "6765274159c0563f42607ad9",
|
|
32
|
-
match: "6765276959c0563f42607adb",
|
|
33
|
-
mcq: "6765275f59c0563f42607ada",
|
|
34
|
-
coverage: "6765277a59c0563f42607adc",
|
|
35
|
-
};
|
|
36
|
-
const videoTypologyDocs = {
|
|
37
|
-
role: "676529e259c0563f42607ae5",
|
|
38
|
-
inputs: "676529f059c0563f42607ae6",
|
|
39
|
-
steps: "6765298b59c0563f42607adf",
|
|
40
|
-
schema: "67652a2559c0563f42607ae7",
|
|
41
|
-
fields: "676529a259c0563f42607ae1",
|
|
42
|
-
concepts: "67652a3459c0563f42607ae8",
|
|
43
|
-
facts: "67652a4459c0563f42607ae9",
|
|
44
|
-
generate: "676529c259c0563f42607ae3",
|
|
45
|
-
summarize: "676529d259c0563f42607ae4",
|
|
14
|
+
exports.promptIds = {
|
|
15
|
+
classify: "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594",
|
|
16
|
+
conceptFacts: "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8",
|
|
17
|
+
cardGeneration: "pmpt_688118a923e4819098176a13a2f401920d2ea17d881cc6c6",
|
|
18
|
+
missingConceptsFacts: "pmpt_687ab50298dc8194b214804999d23df10e03b855371691f9",
|
|
19
|
+
summarize: "pmpt_6902c30a973481968395935cc6dfa78605f50d2b01d4afbd",
|
|
46
20
|
};
|
|
47
21
|
const cardGenInstructionsDocs = {
|
|
48
22
|
cloze: "6780d21318f81be17e39f5c1",
|
|
@@ -63,9 +37,15 @@ const getPrompts = (sourceType, cardGenerationType) => __awaiter(void 0, void 0,
|
|
|
63
37
|
// const typologyDocs = JSON.parse(baseConfig.typologyPrompts);
|
|
64
38
|
// const cardGenerationDocs = JSON.parse(baseConfig.cardGenerationPrompts);
|
|
65
39
|
// const videoTypologyDocs = JSON.parse(baseConfig.videoTypologyPrompts);
|
|
66
|
-
const typologyObjectIds = Object.values(typologyDocs).map((e) =>
|
|
67
|
-
|
|
68
|
-
|
|
40
|
+
// const typologyObjectIds = Object.values(typologyDocs).map((e: any) =>
|
|
41
|
+
// ObjectId.createFromHexString(e.toString())
|
|
42
|
+
// );
|
|
43
|
+
// const cardGenObjectIds = Object.values(cardGenDocs).map((e: any) =>
|
|
44
|
+
// ObjectId.createFromHexString(e)
|
|
45
|
+
// );
|
|
46
|
+
// const typologyVideoObjectIds = Object.values(videoTypologyDocs).map(
|
|
47
|
+
// (e: any) => ObjectId.createFromHexString(e)
|
|
48
|
+
// );
|
|
69
49
|
// Filter card generation instructions and examples based on cardGenerationType array
|
|
70
50
|
const filteredCardGenInstructions = {};
|
|
71
51
|
const filteredCardGenExamples = {};
|
|
@@ -82,42 +62,14 @@ const getPrompts = (sourceType, cardGenerationType) => __awaiter(void 0, void 0,
|
|
|
82
62
|
const cardGenInstructionsObjectIds = Object.values(filteredCardGenInstructions).map((e) => mongo_helper_1.ObjectId.createFromHexString(e));
|
|
83
63
|
const cardGenExamplesObjectIds = Object.values(filteredCardGenExamples).map((e) => mongo_helper_1.ObjectId.createFromHexString(e));
|
|
84
64
|
const bloomInstructionsObjectIds = Object.values(bloomInstructionsDocs).map((e) => mongo_helper_1.ObjectId.createFromHexString(e));
|
|
85
|
-
const typology = yield getPromptString(typologyObjectIds);
|
|
86
|
-
const card_generation = yield getPromptString(cardGenObjectIds);
|
|
87
|
-
const video_typology = yield getPromptString(typologyVideoObjectIds);
|
|
88
65
|
const cardInstructions = yield getPromptString(cardGenInstructionsObjectIds);
|
|
89
66
|
const cardExamples = yield getPromptString(cardGenExamplesObjectIds);
|
|
90
67
|
const bloomInstructions = yield getPromptString(bloomInstructionsObjectIds);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
card_gen: {
|
|
98
|
-
prompt: card_generation,
|
|
99
|
-
ids: Object.values(cardGenDocs),
|
|
100
|
-
},
|
|
101
|
-
card_instructions: cardInstructions,
|
|
102
|
-
card_examples: cardExamples,
|
|
103
|
-
bloom_instructions: bloomInstructions,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
return {
|
|
108
|
-
typology: {
|
|
109
|
-
prompt: typology,
|
|
110
|
-
ids: Object.values(typologyDocs),
|
|
111
|
-
},
|
|
112
|
-
card_gen: {
|
|
113
|
-
prompt: card_generation,
|
|
114
|
-
ids: Object.values(cardGenDocs),
|
|
115
|
-
},
|
|
116
|
-
card_instructions: cardInstructions,
|
|
117
|
-
card_examples: cardExamples,
|
|
118
|
-
bloom_instructions: bloomInstructions,
|
|
119
|
-
};
|
|
120
|
-
}
|
|
68
|
+
return {
|
|
69
|
+
card_instructions: cardInstructions,
|
|
70
|
+
card_examples: cardExamples,
|
|
71
|
+
bloom_instructions: bloomInstructions,
|
|
72
|
+
};
|
|
121
73
|
function getPromptString(promptIds) {
|
|
122
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
75
|
const database = yield (0, mongo_helper_1.setUpMongoClient)();
|