Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

@unsearch/llamaindex

LlamaIndex retriever backed by UnSearch.

Install

pnpm add @unsearch/llamaindex @unsearch/sdk llamaindex

Use

import { UnSearch } from "@unsearch/sdk"
import { UnSearchRetriever } from "@unsearch/llamaindex"
import { RetrieverQueryEngine } from "llamaindex"

const client = new UnSearch({ apiKey: process.env.UNSEARCH_API_KEY! })
const retriever = new UnSearchRetriever(client, { topK: 5, namespace: "my-docs" })

const engine = new RetrieverQueryEngine(retriever)
const response = await engine.query({ query: "What's new in 2026?" })
console.log(response.toString())

Set useNeural: false to use full-text web search instead of vector search over your namespace.