GPAI Typesense Plugin
How to retrieve the API Keys?
This guide presumes that you have successfully deployed your vector embedder model onto a virtual machine or server and that it is currently running. If you have not done this step, please download the package in the member area and following the installation documentation.
- Access your server via SSH
- Navigate to /public/ or the equivalnce of it
- Locate config.php
- Run the command vi config.php or nano config.php
- You should be able to easily locate the two API keys that are displayed on the screen. For security reasons, it is necessary to update the value.
- Save the file
- Enter the value of $search_key is the value to FastAPI Search API Key in the GPAI Typesense plugin
- Enter the value of $upload_key is the value to FastAPI Upload API Key in the GPAI Typesense plugin
Calling the Search Vector API
The default search vector FastAPI Endpoint is yourdomain.com/index/
curl --location --request GET 'https://yourdomain.com/index/?q=<your query>&apikey=<your search api key>'
Calling the Upload Vector API
The default upload vector FastAPI Endpoint is yourdomain.com/upload/
curl --location --request POST 'https://yourdomain.com/upload/' \
--form 'query="<your text>"' \
--form 'apikey="<your upload api key>"'
Tips: If your vector model suddenly did not work, you can try to kill it and restart.
Then go to private/gpai and type source run-fastapi.sh