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

gptzero

v0.0.1-development

Published

A GPTZero client library for javascript

Downloads

4

Readme

gptzero

npm package

Downloads Issues

Commitizen Friendly Semantic Release

A GPTZero client library for javascript

Install

npm install gptzero

Usage

import { createClient  } from 'gptzero-js';

// Create a client to all the GPTZero API
const gptzero = createClient('<YOUR API KEY>')

// Get output for a single string document
gptzero.predictText("Teachers worried about students turning in essays written by a popular artificial intelligence chatbot now have a new tool of their own. Edward Tian, a 22-year-old senior at Princeton University, has built an app to detect whether text is written by ChatGPT, the viral chatbot that's sparked fears over its potential for unethical uses in academia. Tian, a computer science major who is minoring in journalism, spent part of his winter break creating GPTZero, which he said can 'quickly and efficiently' decipher whether a human or ChatGPT authored an essay.");

// Get batched output for files (must be doc, docx, pdf, or txt)
gptzero.predictFiles(["/path/to/file"])


// Output from predictText:
{
    "documents": [
        {
            "average_generated_prob": 0,
            "completely_generated_prob": 0.004087193460490459,
            "overall_burstiness": 33.560890197753906,
            "paragraphs": [
                {
                    "completely_generated_prob": 0.004087193460490459,
                    "num_sentences": 3,
                    "start_sentence_index": 0
                }
            ],
            "sentences": [
                {
                    "generated_prob": 0,
                    "perplexity": 70,
                    "sentence": "Teachers worried about students turning in essays written by a popular artificial intelligence chatbot now have a new tool of their own."
                },
                {
                    "generated_prob": 0,
                    "perplexity": 52,
                    "sentence": "Edward Tian, a 22-year-old senior at Princeton University, has built an app to detect whether text is written by ChatGPT, the viral chatbot that's sparked fears over its potential for unethical uses in academia."
                },
                {
                    "generated_prob": 0,
                    "perplexity": 117,
                    "sentence": "Tian, a computer science major who is minoring in journalism, spent part of his winter break creating GPTZero, which he said can 'quickly and efficiently' decipher whether a human or ChatGPT authored an essay."
                }
            ]
        }
    ]
}

API

For documentation on the output object, see https://gptzero.me/docs

Acknowledgements

Big thanks to https://github.com/ryansonshine/typescript-npm-package-template, on which we built this package.