Socket
Socket
Sign inDemoInstall

aigc-detector

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aigc-detector

Detect if content is generated by AI


Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 06 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc