Skip to content

Commit

Permalink
Fix: increase buffer size for knowledge ingest processFix: increase b…
Browse files Browse the repository at this point in the history
…uffer size for knowledge ingest processFix: increase buffer size for knowledge ingest processFix: increase buffer size for knowledge ingest processFix: increase buffer size for knowledge ingest processFix: increase buffer size for knowledge ingest processFix: increase buffer size for knowledge ingest processFix: increase buffer size for knowledge ingest processFix: increase buffer size for knowledge ingest process

Signed-off-by: Daishan Peng <[email protected]>
  • Loading branch information
StrongMonkey committed Sep 19, 2024
1 parent f6a8147 commit d8586c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions actions/knowledge/knowledge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export async function ingest(
const knowledgeBinaryPath = process.env.KNOWLEDGE_BIN;
const { stdout, stderr } = await execPromise(
`${knowledgeBinaryPath} ingest --prune --dataset ${datasetID} ${dir.replace(/ /g, '\\ ')}`,
{ env: { ...process.env, GPTSCRIPT_GATEWAY_API_KEY: token } }
{
env: { ...process.env, GPTSCRIPT_GATEWAY_API_KEY: token },
maxBuffer: 100 * 1024 * 1024, // Increase buffer size to 100 MB
}
);
const combinedOutput = stdout + stderr;
console.log(`logs for ingesting dataset ${datasetID}: `, combinedOutput);
Expand Down Expand Up @@ -97,7 +100,7 @@ export async function ensureFiles(
}
}

return;
return;
}

export async function runKnowledgeIngest(
Expand All @@ -112,6 +115,7 @@ export async function runKnowledgeIngest(
{
cwd: path.join(KNOWLEDGE_DIR(), 'script_data', id),
env: { ...process.env, GPTSCRIPT_GATEWAY_API_KEY: token },
maxBuffer: 100 * 1024 * 1024, // Increase buffer size to 100 MB
}
);
const combinedOutput = stdout + stderr;
Expand Down

0 comments on commit d8586c2

Please sign in to comment.