Awesome
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.
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:
- 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): <img width="962" alt="image" src="https://user-images.githubusercontent.com/246724/231468275-57c70ada-d9a3-4e0f-ad69-90395d821794.png">
<details> <summary>v0.0 (obsolete):</summary> <img width="750" alt="image" src="https://user-images.githubusercontent.com/246724/228149571-d2059e02-78d1-4724-8be8-8513feddbd2f.png"> </details>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
- Clone locally
- Run
$ yarn install
Start web:
- Run
$ yarn start
- Open browser on
http://0.0.0.0:3010/
Optional: Start plugin-executer service:
- Run
$ cd functions && yarn serve
- 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.