New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

writebot

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

writebot

Writebot is a Node.js library that enables developers to generate text using AI. Using Writebot, developers can create their own custom text generation presets to fit their specific needs.

latest
npmnpm
Version
0.6.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Writebot Library

Writebot is a Node.js library that enables developers to generate text using AI. Using Writebot, developers can create their own custom text generation presets to fit their specific needs.

Docs

You can find the full documentation for Writebot here.

Overview

Writebot works by taking a preset and a set of parameters and producing text with the corresponding AI.

However, developers can also create their own custom presets to fit their needs.

Installation

To install Writebot, use the following command:

npm install writebot or yarn add writebot

Usage

Writebot is a Node.js library and can be used in any Node.js project. To use Writebot, import the library and the desired preset:

To generate text with the desired preset first get your API Key from openai, then use the write method and pass in the preset name or object and the parameters:

Using the preset object

This will generate a tweet about AIs with an "afraid" tone.

const {Writebot} = require('writebot');
const TweetGen = require('tweet-gen');

Writebot.initialize({
    // You can get this at openai
    apiKey: 'API_KEY',
})

const tweet = Writebot.write(TweetGen, {
  description: 'A tweet about AIs',
  tone: 'Afraid'
});

Result:

I'm scared of the way #AI is taking over our world. It feels like our humanity is being taken away from us, one algorithm at a time. #AIisComing

Using the preset name

Or if you would like to use string to identify preset you could do it like this:

const Writebot = require('writebot');

Writebot.initialize({
    apiKey: 'API_KEY',
    // Add the presets you would like to use here.
    types: [
        require('tweet-gen')
    ]
})

const tweet = Writebot.write('tweet', {
  description: 'A tweet meme about developers.',
  tone: 'Sarcastic'
});

Result:

Developers: Always finding new and creative ways to break things. #ProgrammingProblems

License

Writebot is released under the MIT License. See LICENSE for details.

FAQs

Package last updated on 14 Jan 2023

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