Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: increase buffer size for knowledge ingest processFix #527

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading