This repo covers end-to-end examples of various features and integrations with Weaviate for Javascript Developers!
💡 This repo can also be used online with Replit
Clone this repository, and install dependencies
npm install
Head to WCS, where you can easily create a free sandbox cluster.
Take note of your cluster URL
and apiKey
and add them to your .env
file as WEAVIATE_URL
and WEAVIATE_ADMIN_KEY
respectively.
Considering you already have docker installed, you can run:
docker compose up -d
⚠️ If you use Docker, please update all theconnectToWeeaviateCloud()
methods toconnectToLocal()
.
IMPORTANT: Make sure to define your environment variables before running Docker
The .env.example
file contains all the environment variables you would need to run the recipes.
Go to each provider website to create and copy your environment variables, e.g. access your Cohere
variables here.
cp .env_example .env
Navigate to the concept you want to run, pick one of the providers selected and follow the instructions in the README.md
.
Here is an example of how to run a recipe of similarity search with Cohere.
💡 Remember to add your
COHERE_API_KEY
to your.env
file.
Load your data with the following command
npx tsx similarity-search/cohere/load.ts
Query your data with the following command
npx tsx similarity-search/cohere/query.ts
Here are some of the concepts this repository covers:
Similarity Search shows how to run nearText
, nearObject
and nearVector
queries in Weaviate.
Generative Search allows you to improve your search results by piping them through LLM models. It is divided by the different providers:
Please note this is an ongoing project, and updates will be made frequently. If you have a feature you would like to see, please drop it in the Weaviate Forum or open an issue.