GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TheOrcDev/orcish-openai-connector: Simple typescript package to use OpenAI completion & image creation

BranchesTags
Open more actions menu

Latest commit

 

History

116 Commits
116 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.husky
.husky
 
 
src
src
 
 
.eslintignore
.eslintignore
 
 
.eslintrc
.eslintrc
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
README.md
README.md
 
 
cz-config.js
cz-config.js
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

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!');

About

Simple typescript package to use OpenAI completion & image creation

www.npmjs.com/package/orcish-openai-connector

Topics

aiopenaipackagetypescript

Resources

Readme
Activity

Stars

38 stars

Watchers

1 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.