npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

carbon-connect

v3.0.34

Published

## Setup Instructions

Downloads

5,146

Readme

Carbon Connect

Setup Instructions

  1. Clone the repository to your local machine:
    git clone https://github.com/hubbleai/carbon-connect-v3.git
       
    cd carbon-connect-v3
       
  2. Install the project dependencies:
    npm install
       
  3. Link the package using below command:
    npm link
       
  4. Start the development server:
    npm run dev
    
    
  5. In a new directory create a nextJS project (choose default options for prompts) with command:
    npx [email protected] my-app
       
    cd my-app
       
  6. Replace the Page.tsx code with below code snippet`:
"use client";

import {
  CarbonConnect,
  EmbeddingGenerators,
  IntegrationName,
  AutoSyncedSourceTypes,
} from "carbon-connect";
import { useState } from "react";

export default function Home() {
  const [open, setOpen] = useState<boolean>(true);

  const tokenFetcher = async () => {
    const response = await fetch(
      "https://api.dev.carbon.ai/auth/v1/access_token",
      {
        method: "GET",
        headers: {
          "customer-id": "[email protected]",
          Authorization:
            "Bearer 5e8a917c668d195618de63e3fb120c89f72be4ec3d76e23b41f235ed678a5f98",
        },
      }
    );
    if (response.status === 200) {
      const data = await response.json();
      return {
        access_token: data.access_token,
      };
    } else {
      return { access_token: "" };
    }
  };

  return (
    <>
      <CarbonConnect
        orgName="RANDOM"
        brandIcon=""
        tokenFetcher={tokenFetcher}
        environment={"DEVELOPMENT"}
        tags={{
          appType: "chatbot",
          appVersion: "1.1.1",
          appDescription: "Chatbot for Rubber",
          // appId: '378476476985508433',
        }}
        maxFileSize={100000000}
        // allowMultipleFiles={false}
        embeddingModel={EmbeddingGenerators.OPENAI_ADA_LARGE_1024}
        generateSparseVectors={false}
        prependFilenameToChunks={true}
        // entryPoint="INTEGRATIONS_HOME"
        // showFilesTab={false}
        setPageAsBoundary={false}
        useRequestIds={true}
        parsePdfTablesWithOcr={false}
        sendDeletionWebhooks={true}
        // showFilesTab={false}
        // fileSyncConfig={{
        //   auto_synced_data_sources: [AutoSyncedSourceTypes.ARTICLE]
        // }}
        enabledIntegrations={[
          {
            id: IntegrationName.BOX,
          },
          {
            id: IntegrationName.CONFLUENCE,
            syncFilesOnConnection: false,
          },
          {
            id: IntegrationName.DROPBOX,
            setPageAsBoundary: true,
            showFilesTab: false,
          },
          {
            id: IntegrationName.GOOGLE_DRIVE,
            useOcr: true,
            fileSyncConfig: {
              detect_audio_language: true,
              split_rows: true,
            },
            useCarbonFilePicker: true,
          },
          {
            id: IntegrationName.INTERCOM,
            syncFilesOnConnection: true,
            fileSyncConfig: {
              auto_synced_source_types: [AutoSyncedSourceTypes.TICKET],
            },
            syncSourceItems: false,
          },
          {
            id: IntegrationName.LOCAL_FILES,
            chunkSize: 400,
            overlapSize: 20,
            // maxFileSize: 1000000000,
            maxFilesCount: 50,
            skipEmbeddingGeneration: false,
            prependFilenameToChunks: true,
            generateSparseVectors: false,
            maxItemsPerChunk: 2,
            setPageAsBoundary: true,
            sendDeletionWebhooks: true,
            allowedFileTypes: [
              {
                extension: "csv",
                skipEmbeddingGeneration: true,
              },
              {
                extension: "txt",
              },
              {
                extension: "pdf",
                useOcr: true,
              },
              {
                extension: "HTML",
              },
              {
                extension: "mp3",
              },
              {
                extension: "xlsx",
              },
            ],
          },
          {
            id: IntegrationName.NOTION,
          },
          {
            id: IntegrationName.ONEDRIVE,
          },
          {
            id: IntegrationName.SHAREPOINT,
          },
          {
            id: IntegrationName.WEB_SCRAPER,
            // enableAutoSync: true,
            chunkSize: 1100,
            recursionDepth: 0,
            // maxPagesToScrape: 500,
            // embeddingModel: "COHERE_MULTILINGUAL_V3",
            // cssClassesToSkip: ["some"],
            // htmlTagsToSkip: ["script"],
            generateSparseVectors: false,
            // sitemapEnabled: false,
          },
          {
            id: IntegrationName.ZENDESK,
            syncFilesOnConnection: true,
          },
          {
            id: IntegrationName.ZOTERO,
          },
          {
            id: IntegrationName.FRESHDESK,
            syncFilesOnConnection: true,
          },
          {
            id: IntegrationName.GITBOOK,
            syncFilesOnConnection: true,
            syncSourceItems: false,
          },
          {
            id: IntegrationName.GITHUB,
            syncFilesOnConnection: false,
            generateSparseVectors: true,
            skipEmbeddingGeneration: false,
            useOcr: true,
            parsePdfTablesWithOcr: true,
          },
          {
            id: IntegrationName.SALESFORCE,
            syncFilesOnConnection: false,
            setPageAsBoundary: true,
          },
          {
            id: IntegrationName.GMAIL,
            syncFilesOnConnection: false,
          },
          {
            id: IntegrationName.OUTLOOK,
            syncFilesOnConnection: false,
          },
          {
            id: IntegrationName.S3,
            syncFilesOnConnection: false,
            useCarbonFilePicker: true,
          },
          {
            id: IntegrationName.SLACK,
          },
        ]}
        onSuccess={(data: any) =>
          console.log("Data on Success Dropbox: ", data)
        }
        onError={(error: any) => console.log("Data on Error Dropbox: ", error)}
        open={open}
        setOpen={() => setOpen((prev) => !prev)}
      />
    </>
  );
}
  1. Link carbon connect:
    npm link carbon-connect
       
    
  2. Start the development server:
    npm run dev
       
  3. Open your browser and navigate to:
    http://localhost:3000
       
  4. To run the project next time just run command npm run dev in both carbon-connect-v3 and my-app project directories.