Class representing a document loader for loading Taskade project. It extends the BaseDocumentLoader and implements the TaskadeLoaderParams interface. The constructor takes a config object as a parameter, which contains the personal access token and project ID.

const loader = new TaskadeProjectLoader({
personalAccessToken: "TASKADE_PERSONAL_ACCESS_TOKEN",
projectId: "projectId",
});
const docs = await loader.load();

Hierarchy (view full)

Implements

Constructors

Properties

personalAccessToken?: string
projectId: string

Methods

  • Fetches the Taskade project using the Taskade API, creates a Document instance with the JSON representation of the file as the page content and the API URL as the metadata, and returns it.

    Returns Promise<Document<Record<string, any>>[]>

    A Promise that resolves to an array of Document instances.

  • Parameters

    • Optionalsplitter: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>

    Returns Promise<Document<Record<string, any>>[]>

    A Promise that resolves with an array of Document instances, each split according to the provided TextSplitter.

    Use this.load() and splitter.splitDocuments() individually. Loads the documents and splits them using a specified text splitter.