new(basic.gblib): HEAR in Teams will get pictures into URL.
This commit is contained in:
parent
4368fe447b
commit
942c941e1a
1 changed files with 14 additions and 1 deletions
|
@ -92,8 +92,21 @@ export class SystemKeywords {
|
|||
new ApiKeyCredentials({ inHeader: { 'Ocp-Apim-Subscription-Key': process.env.VISION_KEY } }),
|
||||
process.env.VISION_ENDPOINT);
|
||||
|
||||
const caption = (await computerVisionClient.describeImage(url)).captions[0];
|
||||
let caption = (await computerVisionClient.describeImage(url)).captions[0];
|
||||
|
||||
const contentLocale = this.min.core.getParam<string>(
|
||||
this.min.instance,
|
||||
'Default Content Language',
|
||||
GBConfigService.get('DEFAULT_CONTENT_LANGUAGE')
|
||||
);
|
||||
GBLog.info(`GBVision (caption): '${caption.text}' (Confidence: ${caption.confidence.toFixed(2)})`);
|
||||
|
||||
caption = await this.min.conversationalService.translate(
|
||||
this.min,
|
||||
caption,
|
||||
contentLocale
|
||||
);
|
||||
|
||||
return caption.text;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue