GithubHelp home page GithubHelp logo

crazyurus / aigc-detector Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 839 KB

Detect if content is generated by AI

Home Page: https://www.npmjs.com/package/aigc-detector

License: GNU General Public License v3.0

Shell 0.53% JavaScript 7.96% Batchfile 0.44% TypeScript 91.07%
aigc oclif langchain

aigc-detector's Introduction

AIGC Detector

publish GPL-3.0 npm npm dependents npm downloads

Detect if content is generated by AI. Provides command line tools and use in Node.js.

Usage

You need to configure the large model platform and its API Key that the tool depends on. Currently, the following platforms are supported:

You can log in to the above platform to apply for an API Key.

Command Line Tools

First, install globally:

$ npm install aigc-detector -g

Then, you need to configure the API Key you have applied for in the tool. For example:

$ aigc-detector config -p moonshot -k sk-GQz***************************************8UnlrT

Finally, tell us the content that needs to be detected and we can proceed.

$ aigc-detector detect [CONTENT]

Also, You can chat with the large model with the following command:

$ aigc-detector chat

For more ways to use aigc-detector, please refer to the help command.

$ aigc-detector help

Using in Node.js

First, install in your project:

$ npm install aigc-detector

Then, you need to configure the API Key you have applied to initialize. For example:

import { AIGC, Platform } from 'aigc-detector';

const detector = new AIGC({
  apiKey: 'sk-GQz***************************************8UnlrT',
  platform: Platform.Moonshot,
});

Finally, call the detect method and give the content that needs to be detected.

const { probability, reason } = await detector.detect(content);
  • probability is the probability that the content is generated by AI
  • reason is the reason why the content is generated by AI

Develop

You need to execute npm link to create a local debugging cli tool, and then you can use aigc-detector-dev for debugging. For example:

$ aigc-detector-dev config

License

GPL-3.0

aigc-detector's People

Contributors

crazyurus avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.