1.0.1 • Published 3 months ago

cute-socks-openai v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Cute Socks OpenAI Wrapper

A delightful wrapper for OpenAI's API, designed with auto-save conversation capabilities.

Features

  • Automatic conversation history saving to a file with a unique 4-letter hash name.
  • Easy initialization with OpenAI API key.
  • Default set to GPT-4-1106-preview model with a 0.8 temperature.
  • Ability to continue conversations from saved files.

Installation

npm install cute-socks-openai
const CuteSocksOpenAI = require('cute-socks-openai');

const cuteAI = new CuteSocksOpenAI('your-openai-api-key');

// Adding a message automatically saves the conversation
cuteAI.addMessage('user', 'Hello, world!');

// Fetch a response
cuteAI.fetchResponse().then(response => {
    console.log(response);
}).catch(error => {
    console.error(error);
});

// Load a previous conversation
cuteAI.loadConversation('convo-xxxx.json');

in case

https://github.com/sponsors/planetrenox

1.0.1

3 months ago