only_ever_generator 0.8.0 → 0.8.1

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 CHANGED
@@ -1 +1,3 @@
1
- export {};
1
+ import { OnlyEverGenerator } from "./bootstrap/app";
2
+ export { OnlyEverGenerator };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,103 +1,6 @@
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
- };
14
2
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const express_1 = __importDefault(require("express"));
16
- const source_data_1 = require("./constants/source_data");
17
- const config_1 = __importDefault(require("./config"));
18
- const app = (0, express_1.default)();
19
- const port = 3000;
20
- const prompt_data_1 = require("./constants/prompt_data");
3
+ exports.OnlyEverGenerator = void 0;
21
4
  const app_1 = require("./bootstrap/app");
22
- /// While Publishing the package , and using this code as a separate npm module
23
- /// uncomment the below line and comment all the others, expect the import of OnlyEverGenerator
24
- // export { OnlyEverGenerator };
25
- // . All the Codes Below uses express and are strictly for development purpose, while publishing the package, comment everything
26
- // below this line
27
- let oeGen = new app_1.OnlyEverGenerator(config_1.default.openAIKey, "gpt-4o-mini", {
28
- prompt: (0, prompt_data_1.returnPromptData)(),
29
- content: (0, source_data_1.returnSourceData)(),
30
- });
31
- app.get("/", (req, res) => __awaiter(void 0, void 0, void 0, function* () {
32
- // let data = oeGen.returnParsedContent();
33
- // let parsedData = parseResponse()
34
- let cardPrompt = "";
35
- res.send(cardPrompt);
36
- }));
37
- app.get("/openAI", (req, res) => __awaiter(void 0, void 0, void 0, function* () {
38
- // let prompt = returnPromt();
39
- // let prompt = returnCardGenPrompt();
40
- // let content = returnSourceData().toString()
41
- // let headings = returnHeadings();
42
- // // let aiRequest = await openAIRequest(prompt,content);
43
- let aiRequest = yield oeGen.generate(true, true);
44
- res.send(aiRequest);
45
- }));
46
- // app.get("/parseCardData", async (req, res) => {
47
- // let cardResp = returnCardResponse();
48
- // let headings = returnHeadings();
49
- // cardResp.metadata = {
50
- // req_time: cardResp.generated_at ?? new Date(),
51
- // req_type: "card",
52
- // req_tokens: cardResp.usage_data?.prompt_tokens,
53
- // res_tokens: cardResp.usage_data?.completion_tokens,
54
- // model: "40-mini",
55
- // };
56
- // let parsedData = new ParseCardResponse().parse(cardResp, false, {}, 1);
57
- // res.send(parsedData);
58
- // });
59
- // app.get("/generate-cards", async (req, res) => {
60
- // let cardResp = req.query.data as any;
61
- // oeGen.parsedContent!.taxonomy = {
62
- // ...cardResp,
63
- // fields: returnFields(),
64
- // };
65
- // let parsedData = await oeGen.generateCard(
66
- // returnCardGenPrompt(),
67
- // JSON.stringify(cardResp),
68
- // false
69
- // );
70
- // res.send(parsedData);
71
- // });
72
- // app.get("/typology", async (req, res) => {
73
- // {
74
- // let typologyRequest = await oeGen.generate(true, false);
75
- // res.send(typologyRequest);
76
- // }
77
- // });
78
- // app.get("/local-consolidation", async (req, res) => {
79
- // const concepts_facts = embeddingsResp.concepts_facts;
80
- // let locallyConsolidated = new LocalConsolidation().consolidate(
81
- // concepts_facts,
82
- // "sourceID"
83
- // );
84
- // res.send(locallyConsolidated);
85
- // });
86
- // app.get("/global-consolidation", async (req, res) => {
87
- // const concepts_facts = embeddingsResp.concepts_facts;
88
- // // let globallyConsolidated = await new GlobalConsolidation().consolidate(
89
- // // concepts_facts,
90
- // // "sourceID",
91
- // // 0.2
92
- // // );
93
- // // let globallyConsolidated = await oeGen.globalConsolidation(
94
- // // concepts_facts,
95
- // // "sourceID",
96
- // // 0.2
97
- // // );
98
- // // res.send(globallyConsolidated);
99
- // });
100
- app.listen(port, () => {
101
- console.log(`Example app listening at http://localhost:${port}`);
102
- });
5
+ Object.defineProperty(exports, "OnlyEverGenerator", { enumerable: true, get: function () { return app_1.OnlyEverGenerator; } });
103
6
  //# 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":";;;;;;;;;;;;;;AAAA,sDAA8B;AAC9B,yDAKiC;AACjC,sDAA8B;AAC9B,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;AACtB,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,yDAA2D;AAQ3D,yCAAoD;AAOpD,+EAA+E;AAC/E,+FAA+F;AAC/F,gCAAgC;AAEhC,gIAAgI;AAChI,kBAAkB;AAClB,IAAI,KAAK,GAAG,IAAI,uBAAiB,CAAC,gBAAM,CAAC,SAAS,EAAE,aAAa,EAAE;IACjE,MAAM,EAAE,IAAA,8BAAgB,GAAE;IAC1B,OAAO,EAAE,IAAA,8BAAgB,GAAE;CAC5B,CAAC,CAAC;AACH,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9B,0CAA0C;IAC1C,mCAAmC;IACnC,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACvB,CAAC,CAAA,CAAC,CA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ourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AAE3C,kGAFA,uBAAiB,OAEA"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "only_ever_generator",
3
- "version": "0.8.0",
4
- "main": "dist/app.js",
5
- "types": "dist/app.d.ts",
3
+ "version": "0.8.1",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
6
  "scripts": {
7
- "start": "npm run build && nodemon dist/app.js",
7
+ "start": "npm run build && nodemon dist/index.js",
8
8
  "build": "tsc",
9
9
  "test": "echo \"Error: no test specified\" && exit 1",
10
- "example": "npm run build && nodemon dist/app.js"
10
+ "example": "npm run build && nodemon dist/index.js"
11
11
  },
12
12
  "keywords": [],
13
13
  "author": "",
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { OnlyEverGenerator } from "./bootstrap/app";
2
+
3
+ export { OnlyEverGenerator };