gpt4 book ai didi

java - 如何设置 setLanguageHints

转载 作者:太空宇宙 更新时间:2023-11-04 10:52:14 25 4
gpt4 key购买 nike

//Base64 编码 JPEG

base64EncodedImage.encodeContent(imageBytes);
annotateImageRequest.setImage(base64EncodedImage);

// add the features we want
annotateImageRequest.setFeatures(new ArrayList<Feature>() {{
Feature textDetection = new Feature();
textDetection.setType("TEXT_DETECTION");
add(textDetection);
}});
ImageContext ImageCon = new ImageContext();
ImageCon.cou("th,us");
annotateImageRequest.setImageContext(ImageCon);
// Add the list of one thing} to the request
add(annotateImageRequest);
}});

最佳答案

有关如何向 ImageContext 添加语言提示的示例应该是:

ImageContext imageContext = new ImageContext();
String [] languages = { "zh-TW" };
imageContext.setLanguageHints(Arrays.asList(languages));

关于java - 如何设置 setLanguageHints,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47691464/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com