Class for retrieving documents from knowledge uploaded to Dria.

Example

// contract of TypeScript Handbook v4.9 uploaded to Dria
const contractId = "-B64DjhUtCwBdXSpsRytlRQCu-bie-vSTvTIT8Ap3g0";
const retriever = new DriaRetriever({ contractId });

const docs = await retriever.getRelevantDocuments("What is a union type?");
console.log(docs);

Hierarchy

  • BaseRetriever
    • DriaRetriever

Constructors

Properties

Accessors

Constructors

Properties

apiKey: string
driaClient: Dria<any>

Accessors

  • get contractId(): undefined | string
  • Currently connected knowledge on Dria.

    Retriever will use this contract ID while retrieving documents, and will throw an error if undefined.

    In the case that this is undefined, the user is expected to set contract ID manually, such as after creating a new knowledge & inserting data there with the Dria client.

    Returns undefined | string

  • set contractId(value): void
  • Parameters

    • value: string

    Returns void

Generated using TypeDoc