perf: comment

This commit is contained in:
archer
2023-04-10 14:39:46 +08:00
parent 9b1c0e1a3c
commit 0c55beb72d
2 changed files with 4 additions and 1 deletions

View File

@@ -49,6 +49,6 @@ export const jsonRes = <T = any>(
code,
statusText: '',
message: msg,
data: data || error || null
data: data || null
});
};

View File

@@ -127,6 +127,9 @@ export const readDocContent = (file: File) =>
};
});
/**
* 向量转成 float32 buffer 格式
*/
export const vectorToBuffer = (vector: number[]) => {
const npVector = new Float32Array(vector);