Skip to content

Browser library offers protected access to OpenAI API without exposing private key

License

Notifications You must be signed in to change notification settings

lehcode/soakp-client

 
 

Repository files navigation

Secure OpenAI Key Proxy (SOAKP) Client

Introducing SoakpClient: A Browser-focused OpenAI Library for Seamless UI Integration

Are you a UI developer looking to enhance your web-based projects with robust natural language processing capabilities? Look no further! SoakpClient is a TypeScript library designed to overcome the limitations of using the original openai library in browser environments.

With SoakpClient, you can effortlessly integrate the OpenAI API into your user interfaces, providing engaging and interactive experiences for your users. By leveraging a local SOAKP server at https://localhost:<3033>/openai/<completions>, this library ensures secure communication with the OpenAI API, all while complying with browser security restrictions and OpenAI security guidelines. The SOAKP client library is an advanced wrapper of the original openai library.

Key Features

  • Seamlessly integrate the OpenAI API into browser applications.
  • Overcome limitations of using the original openai library in browsers.
  • Use custom-generated JWT hardened by keyphrase for authentication, thus making OpenAI key to not being exposed or leaving the local environment.
  • Empowers UI developers to focus on building intuitive and engaging interfaces.
  • Enables the generation of text completions and chat-based interactions for UI applications.
  • Optimized for creating exceptional user experiences.

SoakpClient is made for UI developers who want to use the power of the OpenAI API in their web-based projects. Whether you're building chatbots, text generation tools, or interactive applications requiring natural language processing, this library provides an interface for making API requests, allowing you to focus on delivering remarkable UI interactions.

First, instantiate the SoakpClient class with the necessary JWT, model, API base URL, and optional Axios configuration. From there, use the intuitive makeRequest method to seamlessly interact with the OpenAI API, generating text completions or facilitating chat-based conversations. Enjoy streamlined API communication and unleash the full potential of your UI applications.

Take your web interfaces to new heights with SoakpClient - the browser-focused OpenAI library for UI developers. Embrace the power of natural language processing, delight your users, and easily create memorable user experiences. Get started today and revolutionize your UI development workflow!

Usage

About

Browser library offers protected access to OpenAI API without exposing private key

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 95.3%
  • CSS 2.6%
  • JavaScript 1.3%
  • HTML 0.8%