only_ever_generator 0.3.5 → 0.3.7
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.js +6 -5
- package/dist/card_gen/generate_cards.js +1 -0
- package/dist/constants/source_data.js +534 -941
- package/dist/gap_fill/calculate_gap_fill.js +0 -4
- package/dist/index.js +1 -1
- package/dist/typology_gen/generate_typology.js +1 -0
- package/dist/utils/parse_openai_response.js +2 -0
- package/package.json +1 -1
- package/src/bootstrap/app.ts +8 -6
- package/src/card_gen/generate_cards.ts +1 -0
- package/src/constants/source_data.ts +534 -941
- package/src/gap_fill/calculate_gap_fill.ts +0 -4
- package/src/index.ts +1 -1
- package/src/typology_gen/generate_typology.ts +2 -0
- package/src/utils/parse_openai_response.ts +1 -0
|
@@ -35,10 +35,6 @@ function gapFilling(typologyResponse, cardgenResponse) {
|
|
|
35
35
|
remainingFacts = allFacts.filter((item) => !generatedFactsSet.includes(item));
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
|
-
// allConcepts: allConcepts,
|
|
39
|
-
// allFacts: allFacts,
|
|
40
|
-
// generatedConcepts: generatedConceptsSet,
|
|
41
|
-
// generatedFacts: generatedFactsSet,
|
|
42
38
|
remainingConcepts: remainingConcepts,
|
|
43
39
|
remainingFacts: remainingFacts,
|
|
44
40
|
};
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ Object.defineProperty(exports, "OnlyEverGenerator", { enumerable: true, get: fun
|
|
|
45
45
|
// // summary_prompt: "",
|
|
46
46
|
// // }
|
|
47
47
|
// // )
|
|
48
|
-
// let typologyRequest = await oeGen.generate(
|
|
48
|
+
// let typologyRequest = await oeGen.generate(false, true);
|
|
49
49
|
// res.send(typologyRequest);
|
|
50
50
|
// }
|
|
51
51
|
// });
|
|
@@ -14,10 +14,12 @@ function parseOpenAiSuccessResponse(responseData) {
|
|
|
14
14
|
}
|
|
15
15
|
exports.parseOpenAiSuccessResponse = parseOpenAiSuccessResponse;
|
|
16
16
|
function parseOpenAiFailureResponse(errorResponse) {
|
|
17
|
+
var _a, _b;
|
|
17
18
|
let usuage = errorResponse.usuage;
|
|
18
19
|
// let statusCode =
|
|
19
20
|
return {
|
|
20
21
|
'status_code': errorResponse.status,
|
|
22
|
+
'message': (_b = (_a = errorResponse.data) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.code
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
exports.parseOpenAiFailureResponse = parseOpenAiFailureResponse;
|
package/package.json
CHANGED
package/src/bootstrap/app.ts
CHANGED
|
@@ -72,7 +72,10 @@ export class OnlyEverGenerator {
|
|
|
72
72
|
if(this.shouldTheCardBeGeneratedAfterTypologyResponse()){
|
|
73
73
|
this.cardgenResponse = await this.generateCard(
|
|
74
74
|
this.promptForCardGen,
|
|
75
|
-
JSON.stringify(
|
|
75
|
+
"Here are the facts and concepts on which cards needs to be generate, refrain from generating missing facts , concepts similar to available below : " +JSON.stringify({
|
|
76
|
+
"facts": this.typologyResponse.facts,
|
|
77
|
+
"concepts": this.typologyResponse.concepts
|
|
78
|
+
}),
|
|
76
79
|
false,
|
|
77
80
|
)
|
|
78
81
|
responseToReturn.push(this.cardgenResponse);
|
|
@@ -107,11 +110,10 @@ export class OnlyEverGenerator {
|
|
|
107
110
|
gapFill.remainingFacts.length !== 0
|
|
108
111
|
) {
|
|
109
112
|
response = await this.generateCard(
|
|
110
|
-
this.promptForCardGen
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
JSON.stringify(cardGenData.cards_data),
|
|
113
|
+
this.promptForCardGen ,
|
|
114
|
+
|
|
115
|
+
"Only Generate Cards For the missing concepts and facts given below \n" +
|
|
116
|
+
JSON.stringify(gapFill) + "\n The cards already generated are below, refrain for generating cards similar to these "+ JSON.stringify(cardGenData.cards_data),
|
|
115
117
|
true
|
|
116
118
|
);
|
|
117
119
|
}
|