Giter VIP home page Giter VIP logo

alt-gpt's Introduction

Netlify Status

Alt-GPT

Multi-model and multi-vendor playground for developing ChatGPT plugins (for OAI and other LLMs).
Inspired by the paper of Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.

alt-gpt-demo-2-720

Features:

  • ๐ŸŒŸ Plugins: Support AI plugins, discover and use and combine plugins and your new ones locally!
  • ๐ŸŒŸ No backend(!): All logic and network requests are on client-side, including usage of your API keys, no keys send to any server other than the LLM provider.
  • BYOK (Bring-your-own-key): Use your own keys, without 3rd party charges. Soon other LLMs will be supported.
  • Local Persistence: Messages and settings are saved locally on your device's LocalStorage

Caveats:

  1. No support for auth-based plugins yet, though, you can specify in the prompt to use an API key in the HTTP request.

How it works:

Without plugins:

When performing completion without any plugins selected, your API key is used directly with the API, via HTTP request, of the relevant LLM vendor (OpenAI for example). No other backend services are involved.

With Plugins:

When selecting one or more plugins, our IntentSDK attempts to classify the user's intention to pick up one or more plugins and defines how each plugin will be used. Then we fetch the plugin's OpenAPI definition and IntentSDK dynamically figures out how to use the plugin's API. Then it executes an HTTP call to the API's server, though, if the plugin is marked as CORS-protected (meaning the service owner did not allow HTTP calls from any website), we'll funnel the call through a simple proxy server to overcome this. You can start your own local instance of this proxy. Finally, all the information collected as an augmented context and a final prompt combining the user's initial prompt + plugin's generated context and sent to LLM for final completion. The operation of plugin augmented retrieval might be chained if intended.

Flow:

v0.1 (current): image

v0.0 (obsolete): image

Creating new API keys

It is recommended to create a dedicated key so it could be revoked easily later.

  • OpenAI: Create new api key here
  • cohere: [TBD]
  • Anthropic: [TBD]
  • AI21: [TBD]

Develop

Setup

  1. Clone locally
  2. Run $ yarn install

Start web:

  1. Run $ yarn start
  2. Open browser on http://0.0.0.0:3010/

Optional: Start plugin-executer service:

  1. Run $ cd functions && yarn serve
  2. Set in your browser devtools localStorage.isLocal = true, to let the FE request your local function.

Contribute

Contributions welcome! Read the contribution guidelines first and submit a Pull Request after Fork this repository.

Contact

Please use GitHub Issues to contact us.

alt-gpt's People

Contributors

livshitz 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.