npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

orcish-openai-connector

v1.5.70

Published

![Untitled design](https://github.com/TheOrcDev/orcish-openai-connector/assets/7549148/d53f1ea9-5eab-4378-8bc0-56c3de5d5abf)

Downloads

79

Readme

Untitled design

Orcish OpenAI Connector

Orcish OpenAI Connector is a simple completion and image creator application powered by OpenAI's language and image models.

Getting Started

Follow these steps to set up and run the Orcish OpenAI Connector.

Prerequisites

Make sure you have Node.js installed on your machine.

Installation

  1. Install the package in your project:

    npm i orcish-openai-connector

    or

    yarn add orcish-openai-connector

    or

    pnpm add orcish-openai-connector
  2. After installation, you can import and use the OrcishOpenAIService class in your project.

    import { OrcishOpenAIService } from 'orcish-openai-connector';
    
    // Create an instance of OrcishOpenAIService
    const orcishOpenAIService = new OrcishOpenAIService({
      apiKey: 'your_openai_api_key',
      // Add other options as needed
    });
    
    // Use OrcishOpenAIService methods
    const chatGPTResult = await orcishOpenAIService.getChatGPTCompletion('Cool orcish name');
    const dalle3Image = await orcishOpenAIService.getDalle3Image('Orc working on a computer');

    Configuration Options

When creating an instance of OrcishOpenAIService, you can provide the following options:

  • apiKey (string, required): Your OpenAI API key.
  • gptModel (string, optional, default: 'gpt-3.5-turbo'): The GPT model to use.
  • gptTemperature (string, optional, default: '0.8'): The temperature parameter for GPT completion.
  • gptMaxTokens (string, optional, default: '1048'): The maximum number of tokens for GPT completion.
  • imageModel (string, optional, default: 'dall-e-3'): The image model to use.
  • imageResolution (string, optional, default: '1792x1024'): The resolution for generated images.

Example:

import { OrcishOpenAIService } from 'orcish-openai-connector';

// Create an instance of OrcishOpenAIService with custom options
const orcishOpenAIService = new OrcishOpenAIService({
  apiKey: 'your_openai_api_key',
  gptModel: 'gpt-3.5-turbo',
  gptTemperature: '0.7',
  gptMaxTokens: '512',
  imageModel: 'dall-e-3',
  imageResolution: '1920x1080',
});

// Use OrcishOpenAIService methods with custom options
const chatGPTResult = await orcishOpenAIService.getChatGPTCompletion('Cool orcish name', {
  gptTemperature: '0.7',
  // Add other options as needed
});

const dalle3Image = await orcishOpenAIService.getDalle3Image('Orc working on a computer', {
  imageResolution: '1792x1024',
  // Add other options as needed
});

const textToSpeech = await orcishOpenAIService.textToSpeech('This is an AI Voice. Hello!');