Skip to content

get-convex/document-search

Repository files navigation

Convex Document Search Component

npm version

  • What is some compelling syntax as a hook?
  • Why should you use this component?
  • Links to Stack / other resources?

Found a bug? Feature request? File it here.

Pre-requisite: Convex

You'll need an existing Convex project to use the component. Convex is a hosted backend platform, including a database, serverless functions, and a ton more you can learn about here.

Run npm create convex or follow any of the quickstarts to set one up.

Installation

Install the component package:

npm install @convex-dev/document-search

Create a convex.config.ts file in your app's convex/ folder and install the component by calling use:

// convex/convex.config.ts
import { defineApp } from "convex/server";
import documentSearch from "@convex-dev/document-search/convex.config";

const app = defineApp();
app.use(documentSearch);

export default app;

Usage

import { components } from "./_generated/api";
import { DocumentSearch } from "@convex-dev/document-search";

const documentSearch = new DocumentSearch(components.documentSearch, {
  ...options,
});

See more example usage in example.ts.

Run the example with npm i && npm run example.

About

Document search component to aid RAG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published