Skip to content
OrbContext
19 pages

Documentation

Overview

What OrbContext gives you and where to begin.

OrbContext answers questions from your own content: policies, product pages, PDFs, spreadsheets. It cites what it used and says so when it does not know. You can use it three ways, and they share the same knowledge, limits and billing.

Your first answer in three calls

Upload a document, wait until it is ready, then ask a question. The full walkthrough is in Get started.

app.ts
import { OrbContext } from '@orbcontext/sdk';

const orb = new OrbContext({
  apiKey: process.env.ORBCONTEXT_API_KEY!,
  baseURL: process.env.ORBCONTEXT_API_URL!,
});

const doc = await orb.documents.upload(botId, file);
await orb.documents.waitUntilReady(doc.id);

const answer = await orb.chat.create({ botId, message: 'What is the refund policy?' });
console.log(answer.text, answer.refused);

Pick your stack

Each guide is a complete, working integration with the key kept on the server.

Explore