Skip to content

shawwn/tensorfork-openai-api

 
 

Repository files navigation

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.

About

A tiny client module for the openAI API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.8%
  • HTML 21.2%