remove actual stdout logging
This commit is contained in:
parent
125c7e5c0d
commit
4f53f11f13
1 changed files with 1 additions and 3 deletions
|
@ -154,12 +154,10 @@ export async function computeImageEmbedding(
|
||||||
const escapedCmd = shellescape(cmd);
|
const escapedCmd = shellescape(cmd);
|
||||||
log.info('running clip command', escapedCmd);
|
log.info('running clip command', escapedCmd);
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const { stdout, stderr } = await execAsync(escapedCmd);
|
const { stdout } = await execAsync(escapedCmd);
|
||||||
log.info('clip command execution time ', Date.now() - startTime);
|
log.info('clip command execution time ', Date.now() - startTime);
|
||||||
// parse stdout and return embedding
|
// parse stdout and return embedding
|
||||||
// get the last line of stdout
|
// get the last line of stdout
|
||||||
log.info('stdout', stdout);
|
|
||||||
log.info('stderr', stderr);
|
|
||||||
const lines = stdout.split('\n');
|
const lines = stdout.split('\n');
|
||||||
const lastLine = lines[lines.length - 1];
|
const lastLine = lines[lines.length - 1];
|
||||||
const embedding = JSON.parse(lastLine);
|
const embedding = JSON.parse(lastLine);
|
||||||
|
|
Loading…
Add table
Reference in a new issue