only_ever_generator 0.1.6 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +48 -48
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "only_ever_generator",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "start": "npm run build && nodemon dist/index.js",
package/src/index.ts CHANGED
@@ -1,66 +1,66 @@
1
1
 
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;
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;
10
10
 
11
11
  import { OnlyEverGenerator } from "./bootstrap/app";
12
12
 
13
13
 
14
14
  /// While Publishing the package , and using this code as a separate npm module
15
15
  /// uncomment the below line and comment all the others, expect the import of OnlyEverGenerator
16
- // export {OnlyEverGenerator};
16
+ export {OnlyEverGenerator};
17
17
 
18
18
 
19
19
 
20
20
 
21
21
  /// All the Codes Below uses express and are strictly for development purpose, while publishing the package, comment everything
22
22
  /// below this line
23
- let oeGen = new OnlyEverGenerator(config.openAIKey,"gpt-3.5-turbo-1106" ,returnSourceData(),returnFields())
24
- app.get('/', async (req, res) => {
25
- // let data = oeGen.returnParsedContent();
26
- // let parsedData = parseResponse()
27
- res.send(200);
28
- });
23
+ // let oeGen = new OnlyEverGenerator(config.openAIKey,"gpt-3.5-turbo-1106" ,returnSourceData(),returnFields())
24
+ // app.get('/', async (req, res) => {
25
+ // // let data = oeGen.returnParsedContent();
26
+ // // let parsedData = parseResponse()
27
+ // res.send(200);
28
+ // });
29
29
 
30
- app.get('/openAI', async (req,res)=> {
31
- // let prompt = returnPromt();
30
+ // app.get('/openAI', async (req,res)=> {
31
+ // // let prompt = returnPromt();
32
32
 
33
- let prompt = returnCardGenPrompt();
34
- let content = returnSourceData().toString()
35
- let headings = returnHeadings();
36
- // let aiRequest = await openAIRequest(prompt,content);
37
- let aiRequest = await oeGen.generateCard(prompt,content, false);
38
- res.send(aiRequest);
39
- });
33
+ // let prompt = returnCardGenPrompt();
34
+ // let content = returnSourceData().toString()
35
+ // let headings = returnHeadings();
36
+ // // let aiRequest = await openAIRequest(prompt,content);
37
+ // let aiRequest = await oeGen.generateCard(prompt,content, false);
38
+ // res.send(aiRequest);
39
+ // });
40
40
 
41
- app.get('/typology', async(req,res)=>{
42
- {
43
- let typologyPrompt = returnTypologyPrompt();
44
- let cardPrompt = returnCardGenPrompt();
45
- let args = new GenerateArgs(
46
- true,
47
- true,
48
- false,
49
- {
50
- typology_prompt: typologyPrompt,
51
- card_gen_prompt: cardPrompt,
52
- summary_prompt: "",
53
- }
54
- )
55
- let typologyRequest = await oeGen.generate(
56
- true,
57
- true
58
- );
59
- res.send(typologyRequest);
41
+ // app.get('/typology', async(req,res)=>{
42
+ // {
43
+ // let typologyPrompt = returnTypologyPrompt();
44
+ // let cardPrompt = returnCardGenPrompt();
45
+ // let args = new GenerateArgs(
46
+ // true,
47
+ // true,
48
+ // false,
49
+ // {
50
+ // typology_prompt: typologyPrompt,
51
+ // card_gen_prompt: cardPrompt,
52
+ // summary_prompt: "",
53
+ // }
54
+ // )
55
+ // let typologyRequest = await oeGen.generate(
56
+ // true,
57
+ // true
58
+ // );
59
+ // res.send(typologyRequest);
60
60
 
61
- }
62
- });
61
+ // }
62
+ // });
63
63
 
64
- app.listen(port, () => {
65
- console.log(`Example app listening at http://localhost:${port}`);
66
- });
64
+ // app.listen(port, () => {
65
+ // console.log(`Example app listening at http://localhost:${port}`);
66
+ // });