Catalog
Installing the ZAI Service
Make sure ZAI is installed. For details, see ZAI Service Installation.
-
ZAI Server Address: The address Sanplex uses to call the ZAI API to power its Agent features. You can enter the server host's IP address or domain name, for example
localhost. -
ZAI Server Port: The port Sanplex uses to call the ZAI API. The default port is
8000. -
App Integration ID: The ID assigned to Sanplex when it connects to the ZAI platform as an application, for example
zai. -
Hash Token: Sanplex uses this token to securely authenticate calls to the ZAI API. Keep it safe. For example:
qAs0y85cebIOWBPsBDaHmwkv8WNfgDSw. -
Admin Token: Sanplex uses this token to securely authenticate calls to the ZAI management API. Keep it safe. For example:
z1Jh0GrchSCE5CBCRvJhsx1JPZKj2kPR.
Once you have the host, application integration ID, port, Hash Token (which is under Integration Management) and Admin Token (which is under Integration Management), save them and Sanplex will connect to the ZAI service. (Enter the actual IP address of the ZAI server here. 127.0.0.1 and localhost are not accepted.)
Next, configure the Content Security Policy (CSP) rules for Sanplex. Edit the config/my.php file in the Sanplex deployment directory and add the following configuration:
Even if ZAI and Sanplex are deployed on the same server, do not use localhost in the CSP settings. Enter the server's actual IP address instead.
$config->CSPs = array("form-action 'self';connect-src 'self' http://<server-ip>:8000");
Note: Make sure the ZAI server can be accessed over the same protocol as Sanplex. For example, if Sanplex is accessed over HTTPS, the ZAI server must also support HTTPS, which usually means configuring a reverse proxy with the appropriate certificates.
Sanplex Data Vectorization
Data vectorization converts data generated in Sanplex (for example, stories, bugs, and documents) into vectors so the AI can cite them in Conversation and answer questions more accurately.
On first use, it must be enabled manually: Go to Agent - ZAI Settings - Data Vectorization, click the Enable Data Vectorization button. Sanplex data vectorization requires the Admin Key to be configured in ZAI Configuration in advance. For details, see ZAI Service Installation.
Once enabled, vectorization needs an initial sync. Click Start Sync to begin, and the page will show the sync progress for each type of object.
When the sync finishes, you can reference Sanplex data in Conversation.