Giter Club home page Giter Club logo

prasoonthakur8 / openai-encoder Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 9 KB

https://www.npmjs.com/package/openai-encoder ๐Ÿ” Advanced text encoding and decoding library optimized for OpenAI's GPT-3 and GPT-4. Designed for performance, reliability, and ease of use.

Home Page: https://www.npmjs.com/package/openai-encoder

License: MIT License

JavaScript 100.00%
gpt-3 gpt-4 javascript npm-package openai text-decoding text-encoding

openai-encoder's Introduction

OpenAI Encoder & Decoder

Advanced text encoding and decoding for OpenAI GPT-3 and GPT-4.

version license

Table of Contents

Installation

To install the package, run the following command:

npm install openai-encoder

Usage

Here's a simple example to get you started:

const encoder = require('openai-encoder/src/encoder');
const decoder = require('openai-encoder/src/decoder');

const originalText = 'This is a test string.';
const encodedText = encoder.encode(originalText);
const decodedText = decoder.decode(encodedText);

console.log(`Original Text: ${originalText}`);
console.log(`Encoded Text: ${encodedText}`);
console.log(`Decoded Text: ${decodedText}`);

API

encode

Encodes the given text.

Parameters

  • text (String): The text to encode.

Returns

  • String: The encoded text.

decode

Decodes the given encoded text.

Parameters

  • encodedText (String): The text to decode.

Returns

  • String: The decoded text.

Testing

To run tests, execute the following command:

npm run test

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

  1. Fork the repo
  2. Clone your fork
  3. Create a feature branch
  4. Make your changes
  5. Commit and push
  6. Create a new Pull Request

License

MIT License. See the LICENSE file for details.

About the Author

Prasoon Thakur

Prasoon Thakur is the developer behind this package. For more information, projects, and contact, please visit prasoonthakur.com.

openai-encoder's People

Contributors

prasoonthakur8 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.