interintel 1.0.5 → 1.0.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.
@@ -2,7 +2,7 @@ require('dotenv').config();
2
2
 
3
3
  const config = {
4
4
  apiKey: `${process.env.OPENAI_API_KEY}`,
5
- aiVersion: `gpt-4`,
5
+ aiVersion: `gpt-3.5-turbo`,
6
6
  filePaths: ['./inter-intel/training/reference.txt', './readme.md'],
7
7
  };
8
8
 
package/package.json CHANGED
@@ -2,17 +2,18 @@
2
2
  "dependencies": {
3
3
  "colors": "^1.4.0",
4
4
  "dotenv": "^16.3.1",
5
+ "interintel": "file:interintel-1.0.6.tgz",
5
6
  "openai": "^4.24.0"
6
7
  },
7
8
  "name": "interintel",
8
9
  "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.5",
10
+ "version": "1.0.7",
10
11
  "main": "index.js",
11
12
  "directories": {
12
13
  "doc": "docs"
13
14
  },
14
15
  "scripts": {
15
- "postinstall": "node setup.js",
16
+ "postinstall": "echo 'Running postinstall script...' && node setup.js",
16
17
  "test": ""
17
18
  },
18
19
  "repository": {
package/setup.js CHANGED
@@ -1,12 +1,20 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
+ const colors = require('colors')
3
4
 
4
- const configPath = path.join(process.cwd(), 'interintel.config.js');
5
+ const configPath = path.join('../../interintel.config.js');
5
6
  const templatePath = path.join(__dirname, 'interintel.config.template.js');
6
7
 
7
- if (!fs.existsSync(configPath)) {
8
- fs.copyFileSync(templatePath, configPath);
9
- console.log('Interintel config created. Please update it with your settings.'.yellow);
10
- } else {
11
- console.log('Interintel config file already exists.'.yellow);
8
+ try {
9
+ if (!fs.existsSync(configPath)) {
10
+ console.log('Config file does not exist, creating...');
11
+ fs.copyFileSync(templatePath, configPath);
12
+ console.log('Interintel config created. Please update it with your settings.'.yellow);
13
+ } else {
14
+ console.log('Interintel config file already exists.');
15
+ }
16
+ } catch (error) {
17
+ console.error('Error occurred during setup:', error);
12
18
  }
19
+
20
+ console.log("Finished setup.js script.");