Skip to content

Commit 4423c35

Browse files
Merge pull request #3 from cloudnautique/main
fix initial bugs and prep for a patch release.
2 parents 8eae7e8 + 0d2b3d0 commit 4423c35

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To use the module and run gptscripts, you need to first set the OPENAI_API_KEY e
2121
To ensure it is working properly, you can run the following command:
2222

2323
```bash
24-
npm exec gptscript https://get.gptscript.ai/echo.gpt --input 'Hello, World!'
24+
npm exec -c "gptscript https://get.gptscript.ai/echo.gpt --input 'Hello, World!'"
2525
```
2626

2727
you will see "Hello, World!" in the output of the command.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gptscript-ai/gptscript",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Run gptscript in node.js",
55
"main": "lib/gptscript.js",
66
"repository": {

scripts/install-binary.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const platform = process.platform;
4343
let arch = process.arch;
4444
if (process.platform === 'darwin') {
4545
arch = 'universal';
46+
} else if (process.arch === 'x64') {
47+
arch = 'amd64';
4648
}
4749

4850
let gptscriptBinaryName = 'gptscript';

src/exec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function exec(command, args, stdin, cwd = './', detached, env) {
4747
}
4848

4949
async function streamExec(command, args, stdin, cwd = './', detached, env) {
50-
const spawnOptions = { maxBuffer: TEN_MEBIBYTE, cwd, detached, env, stdio: ['pipe', 'inherit', 'inherit'] };
50+
const spawnOptions = { maxBuffer: TEN_MEBIBYTE, cwd, detached, env, stdio: ['pipe', 'pipe', 'pipe'] };
5151

5252
const child = childProcess.spawn(command, args, spawnOptions);
5353

src/gptscript.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ async function execFile(scriptPath, input = "", opts = {}) {
9393
}
9494

9595
async function streamExec(prompt, opts = {}) {
96+
opts['quiet'] = false;
9697
const args = toArgs(opts);
9798
try {
9899
return await streamRun(args, prompt);
@@ -102,6 +103,7 @@ async function streamExec(prompt, opts = {}) {
102103
}
103104

104105
async function streamExecFile(scriptPath, input = "", opts = {}) {
106+
opts['quiet'] = false;
105107
const args = toArgs(opts);
106108
try {
107109
const { stdout, stderr, promise } = await streamRun(args, undefined, scriptPath, input);

0 commit comments

Comments
 (0)