AIOBJECT
The AIOBJECT object provides server side access to the OpenAI and Gemini AI models. This will allow PL/B applications to perform data analysis, text/image/audio generation, analyze images, and analyze files, and The declaration syntax of a AIOBJECT object is as follows:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Object instructions are PL/B verbs that support the graphical objects.
|
Release the data structures obtained for an object. | |
|
Associates an event with a program execution label. |
Methods are encapsulated routines that act upon an object.
|
Create a runtime Web View AI thread | |
|
Make an inquiry to an OpenAI or Gemini model | |
|
Obtains the returned JSON data from last successful OpenAI or Gemini AI operation |
Events are actions recognized by an object for which you can write code to respond. Events can occur as a result of a user action or program code, or they can be triggered by the system.
|
Indicates a result is available from a successful Question method |
Note the following:
The AIOBJECT object is implicitly created when a method is executed.
The AIOBJECT object can be used in a DESTROY instruction.
Requires a runtime that contains WebView2 support. The supported executables are plbwin.exe, plbcon.exe, plbwebsrva.exe, and plbservera.exe.
Support files are located in plbai_html directory and must be located in the same directory as the runtime command.:
See Also: Object Definitions, Object I/O Instructions, Method Syntax
![]() |