We have incorporated integration with two leading AI models in ERPAG, namely ChatGPT by OpenAI and Gemini by Google DeepMind.

On each list (and on the report) we have enabled a one click direct call.

data analysis button

When you activate this option, ERPAG formats the data from the list (it includes only active data) in JSON format and passes it to the AI ​​model via API call. This opens the pop up window where we enter the AI ​​Chat question.

ai chat

Note: JSON data length is the size of the data that will be sent. More data means potentially more API token consumption.

And we get the answer (for now) as a text message.

ai chat response

Setting up API parameters

In order to use AI models, it is necessary to connect them with ERPAG via API. The connection is made using API Authorizations in the Automatization / Customization module.

api authorizations

Upon adding, we select which type of AI model we wish to connect.

select api model

Note: Before entering the parameter for API integration, you must own appropriate accounts and generated keys (API key / Secret key).


AI / ChatGPT

When setting API parameters, the most important information is the Secret key. Depending on your account, you must also determine the model under which the calls will be made.

chat gpt

For use in ERPAG, we recommend creating a special Secret key, which is created on the OpenAI platform itself.

create new secret key

The model configuration parameters are identical to those in the OpenAI playground option.

open ai playground

Note: API URL and response JSON path fields are filled in automatically. We have left the possibility to correct manually if there is a change by API service OpenAI.


AI / Gemini

When connecting to Gemini, it is necessary to enter an API Key. You can generate an API Key through Google AI Studio.

google ai studio

Model configuration is similar to the Google AI Studio prompt option.

google ai studio prompt option

Note: API URL and response JSON path fields are filled automatically. We have left the possibility to correct manually if there is a change by the Google AI API service.


Manual use of AI

Apart from direct integration with the above mentioned AI models, data from ERPAG tables can be exported in JSON format and copy/pasted into the prompt of the AI ​​model.

export to json

One of the examples can be Copilot, which is itself integrated into the Windows operating system.

copilot

And the result:

copilot result

AI models in Automation / Blockly scripts

U API toolbox-u Blockly script-i smo posto block AI / Chat.

We are in the Blockly script API toolbox, because we are using block AI / Chat.

blockly

In addition to choosing a model, you can also choose a response format:

  • Text – Response is raw text
  • JSON – Response is formatted in response format
  • Raw data – Complete response from the API service, apart from the response there are also other data (eg the number of spent tokens). It is usually formatted as JSON.

One example of a BOT script:

bot script

Executing the BOT script:

execute bot script


Read More

Related Posts

💬 Start Chat