Setup
CompatibilityCloudflare Vectorize is currently in open beta, and requires a Cloudflare account on a paid plan to use.
vectorize
command in the official documentation.
You’ll then need to update your wrangler.toml
file to include an entry for [[vectorize]]
:
npm
Usage
Below is an example worker that adds documents to a vectorstore, queries it, or clears it depending on the path used. It also uses Cloudflare Workers AI Embeddings.If running locally, be sure to run wrangler as
npx wrangler dev --remote
!filter
parameter to filter by previously loaded metadata.
See the official documentation
for information on the required format.
Related
- Vector store conceptual guide
- Vector store how-to guides