interintel 1.0.3 → 1.0.5
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.
|
@@ -2,8 +2,8 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
4
|
// READING FOR INITAL REFERENCE
|
|
5
|
-
function readSpecificFiles(
|
|
6
|
-
const configFilePath = path.join(__dirname, '../
|
|
5
|
+
function readSpecificFiles(filePath) {
|
|
6
|
+
const configFilePath = path.join(__dirname, '../interintel.config.js');
|
|
7
7
|
|
|
8
8
|
try {
|
|
9
9
|
// Read the content of the config file
|
|
@@ -43,7 +43,7 @@ function writeFileFromPrompt(promptFileName, contentToWrite, baseDir) {
|
|
|
43
43
|
throw new Error("Invalid file name. Please include a file name with an extension (e.g., 'output.txt').");
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
const fullPath = path.join(baseDir, `../
|
|
46
|
+
const fullPath = path.join(baseDir, `../interintel/session-samples/${promptFileName}`);
|
|
47
47
|
const directoryPath = path.dirname(fullPath);
|
|
48
48
|
|
|
49
49
|
if (!fs.existsSync(directoryPath)) {
|
package/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// This is the index.js file of inter-intel
|
|
2
|
-
|
|
2
|
+
const path = require('path')
|
|
3
3
|
const OpenAI = require('openai');
|
|
4
4
|
const readline = require('readline');
|
|
5
|
-
const
|
|
5
|
+
const configPath = path.join(process.cwd(), 'interintel.config.js');
|
|
6
|
+
const config = require(configPath);
|
|
6
7
|
require('dotenv').config();
|
|
7
8
|
require('colors');
|
|
8
9
|
|
|
@@ -24,8 +25,8 @@ const rl = readline.createInterface({
|
|
|
24
25
|
|
|
25
26
|
async function main() {
|
|
26
27
|
// Provides initial context for session
|
|
27
|
-
const specificFiles = ['./
|
|
28
|
-
let initialContent = readSpecificFiles(
|
|
28
|
+
// const specificFiles = ['./interintel.config.js'];
|
|
29
|
+
let initialContent = readSpecificFiles(configPath);
|
|
29
30
|
let messages = [{ role: 'system', content: initialContent }];
|
|
30
31
|
|
|
31
32
|
let currentState = null;
|
|
@@ -102,6 +103,9 @@ async function main() {
|
|
|
102
103
|
main();
|
|
103
104
|
|
|
104
105
|
|
|
106
|
+
exports.main = function() {
|
|
107
|
+
main()
|
|
108
|
+
}
|
|
105
109
|
exports.printMsg = function() {
|
|
106
110
|
console.log("totally logging dude")
|
|
107
111
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "interintel",
|
|
8
8
|
"description": "The application `Interintel` is a command line interface (CLI) application implemented in Node.js. It essentially is an interactive communication tool between the user and an AI model, only openai models for now.",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.5",
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"directories": {
|
|
12
12
|
"doc": "docs"
|
package/setup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
const configPath = path.join(
|
|
4
|
+
const configPath = path.join(process.cwd(), 'interintel.config.js');
|
|
5
5
|
const templatePath = path.join(__dirname, 'interintel.config.template.js');
|
|
6
6
|
|
|
7
7
|
if (!fs.existsSync(configPath)) {
|
|
File without changes
|