This repository contains a Spice application for plasticlist.org, enabling super-fast SQL queries, vector searches, and LLM-based chat interactions over the dataset.
- Install the Spice CLI if you haven't already. Refer to the Getting Started guide.
- A valid OpenAI API Key.
-
Clone this repository and navigate to the project directory:
git clone https://github.com/spiceai/plasticlist.git cd plasticlist -
Set up your
.env.localfile:cp .env .env.local # Edit the .env.local file to include your API key and other required configurations. -
Run Spice. Ensure the working directory is
plasticlist:spice run
This will set up the datasets and the configured LLM model for queries and searches.
Use the spice sql command to run SQL queries against the datasets. For example, to query the samples dataset:
spice sql> SELECT * FROM samples WHERE category = 'plastic' LIMIT 10;This retrieves up to 10 records where the category is "plastic."
Perform vector-based searches using the spice search command. Example:
spice searchsearch> Whole Foods
This finds results related to ocean pollution prevention from the dataset.
Engage with the dataset through an LLM using the spice chat command. Example:
spice chatchat> What are the most common types of plastic in the dataset?
The LLM will generate a response based on the dataset and the GPT model configured in the spicepod.yml file.
- Modify the
spicepod.ymlfile to add new datasets or models. - For detailed documentation on each command, refer to the Spice CLI documentation.
This project is licensed under the MIT License. See the LICENSE file for details.