0.0.4 • Published 4 years ago

tensorfork-openai-api v0.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

tensorfork-openai-api

Overview

This package is a tiny node wrapper for the Tensorfork OpenAI API wrapper.

This project is not affiliated with OpenAI and was written purely out of interest.

Installation

npm i tensorfork-openai-api

Usage

const OpenAI = require('tensorfork-openai-api');
const api = new OpenAI();

(async () => {
  const gptResponse = await api.complete({
    engine: 'davinci',
    prompt: 'Hello, my name is',
    maxTokens: 32,
    temperature: 0.6,
    frequency_penalty: 0.85,
    topP: 1,
    n: 1,
    stream: false,
    stop: ['\n', "testing"],
  });
  
  console.log(gptResponse.data);
})();

Example

For a more complete example, see here.

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago