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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sanechain

v0.0.5

Published

Extended langchain basically, with some added sanity.

Downloads

1

Readme

Sane Chain

An attempt to make langchainjs easier to work with

WIP - ~~nothing works yet, just saving the name~~ Some things work, just um - not tested, no warranties :1st_place_medal:

Adds the following loaders:

  1. Utility Classes
    1. DocumentLoader
  2. Loaders
    1. ChatGPT Loader
    2. Simpler GithubRepoLoader
    3. Roadmap

Utility Classes

DocumentLoader

This class essentially packages up all of langchainjs (plus sanechain) and creates a class: DocumentLoader that can basically load up all your documents regardless of type.

Example:

const filesAndDirectories = [
  'path/to/somefile.md',
  'path/to/somefile.pdf',
  'path/to/somefile.text',
  'path/to/somefile.html',
  'path/to/somedirectory',
  'https://github.com/some/repo',
  'https://github.com/some/other_repo',
  'path/to/chatgpt.json'
]

const documentLoader = new DocumentLoader(filesAndDirectories)
const documents = documentLoader.loadDocuments()
const splitDocuments = documentLoader.splitDocuments()
// Might take time, probably gonna implement a queue system to speed things up, already using async though.
// also @todo add full parity with all langchain python loaders.

Loaders

ChatGPT Loader

import { ChatGPTLoader } from './chat_gpt_loader.js';

const loader = new ChatGPTLoader('path/to/chat/log.json', 10);
const documents = await loader.load();

Simpler GithubRepoLoader

Insert github link, get repo documents.

  import {GithubRepoLoader} from 'sanechain'
  const loader = new GithubRepoLoader("https://github.com/owner/repo", { /*params*/ });
  const documents = await loader.load();

Roadmap

  • [ ] Models
    • [ ] General
    • [ ] Chat
    • [ ] Embeddings
  • [ ] Prompts
    • [ ] General Templates
    • [ ] Chat Template
    • [ ] Example Selectors
    • [ ] Output Parsers
  • [ ] Indexes (Primary focus at first)
    • [ ] Document Loaders %%
      • [ ] Airbyte JSON
      • [ ] Apify Dataset
      • [ ] Arxiv
      • [ ] AWS S3
      • [ ] AZLyrics
      • [ ] Azure Blob Storage
      • [ ] Bilibili
      • [ ] Blackboard
      • [ ] Blockchain
      • [x] ChatGPT Data
      • [ ] Confluence
      • [ ] CoNLL-U
      • [ ] Copy / Paste
      • [x] CSV (langchainjs)
      • [ ] Diffbot
      • [ ] Discord
      • [ ] DuckDB
      • [ ] Email
      • [x] EPub (langchainjs)
      • [ ] EverNote
      • [ ] Facebook Chat
      • [ ] Figma
      • [x] File Directory (langchainjs)
      • [x] Git (langchainjs + custom url loader)
      • [ ] GitBook
      • [ ] Google BigQuery
      • [ ] Google Cloud Storage
      • [ ] Google Drive
      • [ ] Gutenberg
      • [ ] Hacker News
      • [ ] HTML
      • [ ] HuggingFace dataset
      • [ ] iFixit
      • [ ] Images
      • [ ] Image captions
      • [ ] IMDB
      • [ ] JSON Files (langchain)
      • [ ] Jupyter Notebook
      • [x] Markdown (sorta, just parses using TextLoader)
      • [ ] MediaWikiDump
      • [ ] Microsoft OneDrive
      • [ ] Microsoft PowerPoint
      • [x] Microsoft Word (langchainjs)
      • [ ] Modern Treasury
      • [ ] Notion DB 1/2
      • [ ] Notion DB 2/2
      • [ ] Obsidian
      • [ ] Pandas DataFrame
      • [x] PDF (langchain)
      • [ ] Using PyPDFium2
      • [ ] ReadTheDocs Documentation
      • [ ] Reddit
      • [ ] Roam
      • [ ] Sitemap
      • [ ] Slack
      • [ ] Spreedly
      • [ ] Stripe
      • [ ] Subtitle (langchain)
      • [ ] Telegram
      • [ ] TOML
      • [ ] Twitter
      • [ ] Unstructured File (half way)
      • [x] URL (langchainjs via puppetter, playwright, cheerio, etc)
      • [ ] Selenium URL Loader
      • [x] Playwright URL Loader (langchainjs)
      • [ ] WebBaseLoader
      • [ ] WhatsApp Chat
      • [ ] Wikipedia
      • [ ] YouTube transcripts [ Text Splitters ]
      • [ ] Character Text Splitter
      • [ ] HuggingFace Length Function
      • [ ] Latext Text SPlitter
      • [ ] Markdown Text Splitter
      • [ ] NLTK Text Splitter
      • [ ] RecursiveCharacterTextSplitter
      • [ ] Spacy Text Splitter
      • [ ] tiktoken (OpenAI) Length Function
      • [ ] TiktokenTextSplitter
    • [ ] Vector stores
    • [ ] Retrievers
  • [ ] Memory (TBD)
  • [ ] Chains (TBD)
  • [ ] Agents
    • [ ] Tools (TBD)
    • [ ] Agents (TBD)
    • [ ] Toolkits (TBD)
    • [ ] AgentExecutors (TBD)