我确信我错过了一些简单的东西,但我不能让它工作:
const request = {
"requests": [
{
"image": {
"source": {
"imageUri":
`gs://${bucketName}/thumbnails/${fileName}`,
},
},
},
],
};
const [textDetection] = await client.textDetection(request);
抛出错误:不存在图像。在_coerceRequest
但是,随着
const request = `gs://${bucketName}/thumbnails/${fileName}`
const [textDetection] = await client.textDetection(request);
一切正常。 我已经阅读了文档(https://googleapis.dev/nodejs/vision/latest/v1.ImageAnnotatorClient.html#textDetection)并在网上搜索提示,但这对于其他用户来说似乎不是问题.
我错过了什么,我为这个而疯狂:(