mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: reduce image size
This commit is contained in:
parent
ee5f037dac
commit
16d858f15e
@ -118,7 +118,7 @@ export const processImage = async (url: string, tracker: TokenTracker): Promise<
|
||||
}
|
||||
|
||||
const newUrl = await saveImageToFirebase(buff, contentType);
|
||||
const canvas = fitImageToSquareBox(img, 512);
|
||||
const canvas = fitImageToSquareBox(img, 256);
|
||||
const base64Data = (await canvasToDataUrl(canvas)).split(',')[1];
|
||||
|
||||
const {embeddings} = await getEmbeddings([{ image: base64Data }], tracker, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user