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.

  1. Access your server via SSH
  2. Navigate to /public/ or the equivalnce of it
  3. Locate config.php
  4. Run the command vi config.php or nano config.php
  5. 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.
  6. Save the file
  7. Enter the value of $search_key is the value to FastAPI Search API Key in the GPAI Typesense plugin
  8. 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:

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:

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.

pkill gunicorn

Then go to private/gpai and type source run-fastapi.sh