only_ever_generator 0.1.7 → 0.1.8
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.js +49 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,59 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
2
|
+
// import express from "express";
|
|
3
|
+
// import { returnCardGenPrompt } from "./constants/prompts/card_gen_prompt";
|
|
4
|
+
// import { returnTypologyPrompt } from "./constants/prompts/typology_prompt";
|
|
5
|
+
// import { GenerateArgs } from "./utils/generate_args";
|
|
6
|
+
// import { returnFields, returnHeadings, returnSourceData } from "./constants/source_data";
|
|
7
|
+
// import config from "./config";
|
|
8
|
+
// const app = express();
|
|
9
|
+
// const port = 3000;
|
|
14
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
|
|
16
|
-
const card_gen_prompt_1 = require("./constants/prompts/card_gen_prompt");
|
|
17
|
-
const typology_prompt_1 = require("./constants/prompts/typology_prompt");
|
|
18
|
-
const generate_args_1 = require("./utils/generate_args");
|
|
19
|
-
const source_data_1 = require("./constants/source_data");
|
|
20
|
-
const config_1 = __importDefault(require("./config"));
|
|
21
|
-
const app = (0, express_1.default)();
|
|
22
|
-
const port = 3000;
|
|
11
|
+
exports.OnlyEverGenerator = void 0;
|
|
23
12
|
const app_1 = require("./bootstrap/app");
|
|
24
|
-
|
|
25
|
-
/// uncomment the below line and comment all the others, expect the import of OnlyEverGenerator
|
|
26
|
-
// export {OnlyEverGenerator};
|
|
13
|
+
Object.defineProperty(exports, "OnlyEverGenerator", { enumerable: true, get: function () { return app_1.OnlyEverGenerator; } });
|
|
27
14
|
/// All the Codes Below uses express and are strictly for development purpose, while publishing the package, comment everything
|
|
28
15
|
/// below this line
|
|
29
|
-
let oeGen =
|
|
30
|
-
app.get('/', (req, res)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
app.get('/openAI', (req,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
app.get('/typology', (req,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
16
|
+
// let oeGen = new OnlyEverGenerator(config.openAIKey,"gpt-3.5-turbo-1106" ,returnSourceData(),returnFields())
|
|
17
|
+
// app.get('/', async (req, res) => {
|
|
18
|
+
// // let data = oeGen.returnParsedContent();
|
|
19
|
+
// // let parsedData = parseResponse()
|
|
20
|
+
// res.send(200);
|
|
21
|
+
// });
|
|
22
|
+
// app.get('/openAI', async (req,res)=> {
|
|
23
|
+
// // let prompt = returnPromt();
|
|
24
|
+
// let prompt = returnCardGenPrompt();
|
|
25
|
+
// let content = returnSourceData().toString()
|
|
26
|
+
// let headings = returnHeadings();
|
|
27
|
+
// // let aiRequest = await openAIRequest(prompt,content);
|
|
28
|
+
// let aiRequest = await oeGen.generateCard(prompt,content, false);
|
|
29
|
+
// res.send(aiRequest);
|
|
30
|
+
// });
|
|
31
|
+
// app.get('/typology', async(req,res)=>{
|
|
32
|
+
// {
|
|
33
|
+
// let typologyPrompt = returnTypologyPrompt();
|
|
34
|
+
// let cardPrompt = returnCardGenPrompt();
|
|
35
|
+
// let args = new GenerateArgs(
|
|
36
|
+
// true,
|
|
37
|
+
// true,
|
|
38
|
+
// false,
|
|
39
|
+
// {
|
|
40
|
+
// typology_prompt: typologyPrompt,
|
|
41
|
+
// card_gen_prompt: cardPrompt,
|
|
42
|
+
// summary_prompt: "",
|
|
43
|
+
// }
|
|
44
|
+
// )
|
|
45
|
+
// let typologyRequest = await oeGen.generate(
|
|
46
|
+
// true,
|
|
47
|
+
// true
|
|
48
|
+
// );
|
|
49
|
+
// res.send(typologyRequest);
|
|
50
|
+
// }
|
|
51
|
+
// });
|
|
52
|
+
// app.listen(port, () => {
|
|
53
|
+
// console.log(`Example app listening at http://localhost:${port}`);
|
|
54
|
+
// });
|