Demo for my Adding AI-powered semantic search to your Joomla site at JDayUSA 2023.
-
Set up the project:
git clone https://github.com/dandv/jdayusa-weaviate cd jdayusa-weaviate npm install
-
Optionally update the sessions JSON file. The
sessions.json
from the repo is up-to-date as of 2023-April-13.npm run parse # updates sessions.json from jdayusa.com/sessions
-
Create a Weaviate instance. This can be as simple as running the single-executable Linux binary from the latest release, or signing up for a free Weaviate Cloud Services sandbox, or running a Docker container locally.
-
Create a
.env
file in the project directory with the following keys:OPENAI_APIKEY=...get this from https://platform.openai.com/account/api-keys... # The following two keys are only necessary if you use WCS; not if using Docker WEAVIATE_HOST=...sign up at https://console.weaviate.cloud and paste the host here (without https)... WEAVIATE_API_KEY=...get the Admin key from Weaviate Cloud Services...
-
Take note of the Weaviate cluster hostname, e.g.
localhost:8080
for Docker orjdayusa-ctv1de32.weaviate.network
if using WCS. Store this in the.env
file as theWEAVIATE_HOST
. -
For WCS, click on the cluster Details then the key 🔑 icon and copy the Admin key. Store it as
WEAVIATE_API_KEY
in the.env
file.
-
-
Create the Weaviate schema and import the data from the JSON file
npm run ingest
-
Run the proxy server
npm run proxy
You can now run semantic queries via the GraphQL IDE provided by the Weaviate Cloud Services console. You'll need to add your OpenAI API key in the Variables section: