...
Note |
---|
This example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance. |
Introduction
AI language models have a wide range of usages in relation to product information. You could use it to automatically generate descriptions of a product to a specific audience. It could also be used to automatically group products into meaningful categories for a webshop.
...
The second Action queries the language model through an SELECT.API and then returns the answer to the first Action, which then imports the joined result.
0. Prerequisites
In order to get the Actions working you need the following in your Perfion installation:
...
Additional changes might be needed to adapt the Action to your specific installation.
1. Context Action For Products
From Perfion 5.2 and onwards, it is possible to make Actions available from the Grid's toolbar. This allows you to execute Action on specific Items.
Make the Action available
To make an Action available in the Context of Products, add “Product” to the list of Context on the Action, on the right-hand side of the Action Section
...
This will make the Action available in the Product Section
...
The Action
The first Action receives the Items data source containing the ItemIDs of the chosen Products and then passes it to an EXECUTE.ACTION.LOOP. This makes sure that each of the chosen products will be queried against Open AI one at a time.
...
In the loop, the Open AI API will be queried and then the result will be passed and joined to a global data source named $EnrichedProducts. This data source is then imported.
2. Action to Query Remote API
This Action receives input from the EXECUTE.ACTION.LOOP, which will be the Perfion Item ID of one Product at a time.
...
For optimization, the result is not imported yet but joined to a global data source $EnrichedProducts. This data source is imported in the first Action, after the EXECUTE.ACTION.LOOP has completed.
3. Result
When the Actions have finished running, you will be able to see the resulting SEO keywords on the products and see what the prompt used to query Open AI was.
...