Ask AI Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > Ask AI Commands >

Ask AI Commands

AIC.Ask_Vision

Previous Top Next


MiniRobotLanguage (MRL)

 

AIC.Ask Vision

Send a Single Picture to the Open AI "Vision A.I."-Endpoint and receive a description of this picture

 

 

Intention

 

Using the AIC.Ask Vision command you can send a picture to the OpenAI Vision endpoint and receive a text-description about this picture.

You can also send a prompt and tell the Vision AI what exactly you want to know about this picture and this way you can influence the result that you get.

 

The current model is best at answering general questions about what is present in the images. While it does understand the relationship between objects in images, it is not yet optimized to answer detailed questions about the location of certain objects in an image. For example, you can ask it what color a car is or what some ideas for dinner might be based on what is in you fridge, but if you show it an image of a room and ask it where the chair is, it may not answer the question correctly.

The latency of the model can also be improved by downsizing your images ahead of time to be less than the maximum size they are expected them to be. For low res mode, we expect a 512px x 512px image. For high rest mode, the short side of the image should be less than 768px and the long side should be less than 2,000px. You can use the AIC.EnsureFormatResize Command to automatically generate resized versions of Pictures.

 

Actually the OpenAI Vision API will only accept ".jpg"-Files. Therefore you best provide ".jpg"-FIles.

However, if you provide other files, the SPR will internally generate jpg-Versions of these files in the "?temp\" (Windows-Temp-Folder) and use these instead.

Using AIC.Ask Vision the SPR will automatically delete these temporary files after the process.

 

 

clip0906

This is a Sample result using the AIC.Ask Vision Command.

 

clip0907

This is a Sample result using the AIC.Ask Vision Command.

 

 

Syntax

 

 

AIC.Ask Vision|P1|P2[|P3]

 

 

Parameter Explanation

 

P1 - Picture, File name - Is the Path and File name for the Picture to upload to the AI-

P2 - Prompt - Prompt to tell the AI what you want to know from the picture.

P3 -(optional) Variable that will receive the result. If omitted the result is placed on TOS.

 

 

 

 

Example

 

'***********************************

' AIC.-Sample

'***********************************
AIC.Set Key|File

$$PAT=F:\Testfolder

$$URL=$$PAT\Testpic_XL.jpg

$$PRO=Tell me what you see.

AIC.Ask Vision|$$URL|$$PRO|$$RET

'AIC.Show Error

MBX.$$RET

ENR.

 

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: