Coder Social home page Coder Social logo

smol-ai / godmode Goto Github PK

View Code? Open in Web Editor NEW
4.0K 36.0 305.0 5.6 MB

AI Chat Browser: Fast, Full webapp access to ChatGPT / Claude / Bard / Bing / Llama2! I use this 20 times a day.

Home Page: https://smol.ai

License: MIT License

JavaScript 35.85% CSS 2.87% HTML 0.16% TypeScript 61.05% EJS 0.08%
bard chatgpt google electron menubar

godmode's Introduction

🐣 GodMode - the smol AI Chat Browser

This is a dedicated chat browser that only does one thing: help you quickly access the full webapps of ChatGPT, Claude 2, Perplexity, Bing and more with a single keyboard shortcut (Cmd+Shift+G).

image

(click for video)

Whatever is typed at the bottom is entered into all web apps simultaneously, however if you wish to explore one further than the other you can do so independently since they are just webviews.

Installation

Install here! And then log in to Google on any one of the providers + refreshing logs you into most of the rest. Google Bard seems to have weird auth requirements we havent figured out yet - logging into Google via Anthropic Claude first seems to be the most reliable right now while we figure it out.

Download:

You can also build from source, see instructions below.

Mixture of Mixture of Experts

It's well discussed by now that GPT4 is a mixture of experts model, which explains its great advancement over GPT3 while not sacrificing speed. It stands to reason that if you can run one chat and get results from all the top closed/open source models, you will get that much more diversity in results for what you seek. As a side benefit, we will add opt-in data submission soon so we can crowdsource statistics on win rates, niche advantages, and show them over time.

“That's why it's always worth having a few philosophers around the place. One minute it's all is truth beauty and is beauty truth, and does a falling tree in the forest make a sound if there's no one there to hear it, and then just when you think they're going to start dribbling one of 'em says, incidentally, putting a thirty-foot parabolic reflector on a high place to shoot the rays of the sun at an enemy's ships would be a very interesting demonstration of optical principles.”

Terry Pratchett, Small Gods

Oh so this is like nat.dev?

Yes and no:

  1. SOTA functionality is often released without API (eg: ChatGPT Code Interpreter, Bing Image Creator, Bard Multimodal Input, Claude Multifile Upload). We insist on using webapps so that you have full access to all functionality on launch day. We also made light/dark mode for each app, just for fun (Cmd+Shift+L (Aug update: currently broken in the GodMode rewrite, will fix))
  2. This is a secondary browser that can be pulled up with a keyboard shortcut (Cmd+Shift+G, customizable). Feels a LOT faster than having it live in a browser window somewhere and is easy to pull up/dismiss during long generations.
  3. Supports no-API models like Perplexity and Poe, and local models like LLaMa and Vicuna (via OobaBooga).
  4. No paywall, build from source.
  5. Fancy new features like PromptCritic (AI assisted prompt improvement)

Supported LLM Providers

Provider (default in bold) Notes
ChatGPT Defaults to "GPT4.5"!
Claude 2 Excellent, long context, multi document, fast model.
Perplexity The login is finnicky - login to Google on any of the other chats, and then reload (cmd+R) - it'll auto login. Hopefully they make it more intuitive/reliable in future.
Bing Microsoft's best. It's not the same as GPT-4!. We could use help normalizing its styling.
Bard Google's best. Bard's updates are... flaky
Llama2 via Perplexity Simple model host. Can run the latest CodeLlama 34B model! try it!
Llama2 via Lepton.ai Simple model host. Is very fast
Quora Poe Great at answering general knowledge questions
Inflection Pi Very unique long-memory clean conversation style
You.com Chat great search + chat answers, one of the first
HuggingChat Simple model host. Offers Llama2, OpenAssistant
Vercel Chat Simple open source chat wrapper for GPT3 API
Local/GGML Models (via OobaBooga) Requires Local Setup, see oobabooga docs
Phind Developer focused chat with finetuned CodeLlama
Stable Chat Chat interface for Stable Beluga, an open LLM by Stability AI.
OpenRouter Access GPT4, Claude, PaLM, and open source models
OpenAssistant Coming Soon — Submit a PR!
Claude 1 Requires Beta Access
... What Else? Submit a New Issue!

Features and Usage

  • Keyboard Shortcuts:

    • Use Cmd+Shift+G for quick open and Cmd+Enter to submit.
    • Customize these shortcuts (thanks @davej!):
      • Quick Open
        • image
      • Submit can be toggled to use Enter (faster for quick chat replies) vs Cmd+Enter (easier to enter multiline prompts)
    • Cmd+Shift+L to toggle light/dark mode (not customizable for now)
    • Remember you can customize further by building from source!
  • Pane Resizing and Rearranging:

    • Resize the panes by clicking and dragging.
    • Use Cmd+1/2/3 to pop out individual webviews
    • Use Cmd +/- to zoom in/out globally
    • open up the panel on the bottom right to reorder panes or reset them to default
    • Cmd p to pin/unpin the window Always on Top
  • Model Toggle:

    • Enable/disable providers by accessing the context menu. The choice is saved for future sessions.
    • Supported models: ChatGPT, Bing, Bard, Claude 1/2, and more (see Supported LLM Providers above)
  • Support for oobabooga/text-generation-webui:

    • Initial support for oobabooga/text-generation-webui has been added.
    • Users need to follow the process outlined in the text-generation-webui repository, including downloading models (e.g. LLaMa-13B-GGML, or GPT4-x-alpaca).
    • Run the model on http://127.0.0.1:7860/ before running it inside of the smol GodMode browser.
    • The UI only supports one kind of prompt template. Contributions are welcome to make the templating customizable (see the Oobabooga.js provider).
  • Starting New Conversations:

    • Use Cmd+R to start a new conversation with a simple window refresh.
  • Prompt Critic: Uses Llama 2 to improve your prompting when you want it!

video demo

Download and Setup

You can:

  • download the precompiled binaries: https://github.com/smol-ai/GodMode/releases/latest (sometimes Apple/Windows marks these as untrusted/damaged, just open them up in Applications and right-click-open to run it).
    • for Macs, you can use the "-universal.dmg" versions and it will choose between Apple Silicon/Intel architectures. We recommend installing this, but just fyi:
      • Apple Silicon M1/M2 macs use the "arm64" version
      • Intel Macs use the ".dmg" versions with no "arm64"
    • for Windows, use ".exe" version. It will be marked as untrusted for now as we haven't done Windows codesigning yet
    • for Linux, use ".AppImage".
    • for Arch Linux, there is a third party AUR package: aur.archlinux.org/packages/godmode
  • Or run it from source (instructions below)

When you first run the app:

  1. log into your Google account (once you log into your google account for chatgpt, you'l also be logged in to Bard, Perplexity, Anthropic, etc). logging into Google via Anthropic Claude first seems to be the most reliable right now while we figure it out
  2. For Bing, after you log in to your Microsoft account, you'll need to refresh to get into the Bing Chat screen. It's a little finnicky at first try but it works.

Optional: You can have GodMode start up automatically on login - just go to Settings and toggle it on. Thanks @leeknowlton!

image

seeking contributors!

please see https://github.com/smol-ai/GodMode/blob/main/CONTRIBUTING.md

build from source

If you want to build from source, you will need to clone the repo and open the project folder:

  1. Clone the repository and navigate to the project folder:

    git clone https://github.com/smol-ai/GodMode.git
    cd GodMode
    npm install --force
    npm run start # to run in development, locally
  2. Generate binaries:

    npm run package # https://electron-react-boilerplate.js.org/docs/packaging
    # ts-node scripts/clean.js dist clears the webpackPaths.distPath, webpackPaths.buildPath, webpackPaths.dllPath
    # npm run build outputs to /release/app/dist/main
    # electron-builder build --publish never builds and code signs the app.
    
    # this is mostly for swyx to publish the official codesigned and notarized releases

    The outputs will be located in the /release/build directory.

Related project

I only later heard about https://github.com/sunner/ChatALL which is cool but I think defaulting to a menbuar/webview experience is better - you get to use full features like Code Interpreter and Claude 2 file upload when they come out, without waiting for API

godmode's People

Contributors

alexanderatallah avatar andrewsiah avatar anujbgit avatar chriscarrollsmith avatar codingnninja avatar davej avatar eltociear avatar fardeem avatar ivanleomk avatar jmxo avatar kataqatsi avatar kilian avatar kolinkorr839 avatar leeknowlton avatar lenohard avatar martypenner avatar mbdeane avatar mwyywm avatar seanoliver avatar swyxio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godmode's Issues

Fullscreen keyboard shortcut is set up globally

It interferes with other apps like VSCode's "Find in project" shortcut. I would suggest that we listen for this shortcut in the interface.js file instead. Then it will only be triggered when the interface is open.

Happy to implement this if I get the thumbs up.

running with x86

On x86, this line was requiring that the package be signed to run... comment out if you're trying to get something working

index.js

- require("update-electron-app")();
+ //require("update-electron-app")();

Screenshot 2023-05-22 at 6 33 37 PM

Command + Shift + G switches desktops on macOS instead of opening on the current desktop

Problem: if you use multiple desktops (spaces) on macOS, then pressing Command + Shift + G will switch to the desktop that you originally opened the app on.

Expected behaviour: I would expect the app to open on the current desktop, regardless of which desktop it was originally opened on.

Workaround (updated): right click on the app, select Options, and then Assign To All Desktops.

Claude Manual Email / Login Code Failing

Hello! Google SSO doesn't work so I tried email login and I get the code, but alas, it doesn't work. It works fine in the browser, but not here. Any ideas?

Thanks!

image

[Looking for Contributor] New Provider: Quora Poe

in #32 we added Provider modules to make it easy to add more chats. if you're new here and want an easy way to contribute, now it's a lot easier!

please claim this and send a PR for us to review!

this work is split out from #13

Support for the new Claude open beta

Excited to have finally gotten access to Claude with the new open beta, but there's a strange bug in menubar that won't allow me to sign in either using Google OAuth or the email auth flows.

Tried updating the URL to the public URL and also changing the user agent to Edge (copied the code from the Bing implementation), but neither are working.

image

Setup issues

The first of the 4 frames works fine, but:

  • 2nd: when I click X, Start chatting, and learn more, nothing happens
  • 3rd: login code doesn't work (tried a few times, made sure not to copy/paste a space in the number)
  • 4th: blank
image

Bug: Bing URLs and paste not working

Behavior

  • Paste into bing chat does nothing
  • Clicking on links does nothing:
image
  • cmd+click gives:
image

Steps to reproduce

  • menubar 0.0.11-x64, installed from dmg
  • Ventura 13.4.1
  • Logged into Bing, tried to paste and click on links in response

Will consider installing from src to use devtools

[Feature] Screen Real Estate Ideas

I'm loving the menu bar, using it daily. Things do get a little cramped on the screen — maybe more so since I have a learning disability - but I'd wager for anyone, since both GPT-n and Bard output walls of content.

A few ideas that'd help a ton, in no particular order:

  1. Manual resizability;
  2. Ability to launch smolmenubar in its own window;
  3. A full-screen mode.

I particularly like the external window idea since:

  • It also facilitates resizability (1 above)
  • We could manipulate it using window managers (like Rectangle)

Fix page resize

I created this issue just in case my tweet gets buried.

I'm not sure about your preference for code structure and external deps, so I created a a sandbox based on this repo. I am using jQuery and its resize plugin because you mentioned that you're already using it (I've never written jQuery in my life, so this has been a fun exercise).

You can search for "MODIFIED CODE" to see my changes. Let me know if you have any question.

Great work!!

I was literally just texting my friends about building something like this and then stumbled over it after reading the code for smol developer. Thank you !!

[Feature] add preset Style/System prompt modifiers

most chat ux is just one textbox.

but actually it's useful to have little toggles or dropdowns that set the chatapps to respond in certain useful ways:

  • System/Role prompts
    • (None)
    • You are a programming assistant.
    • You are a chatbot for docs. Here is the following content of the docs:
    • You are a patient teacher explaining a concept to a competent but non-expert developer.
  • Style prompts
    • (None)
    • Respond with valid JSON and only JSON
    • Respond with valid Python code and only Python code. No backticks.
    • Respond with a markdown table.
    • Respond in Markdown with 2-3 bullet points for each section, with important keywords, concepts, people, dates, and numbers bolded
  • metaprompts
    • Help me craft a really good prompt for ChatGPT.
      First, ask me what I want to do. Pause and wait for my answer. Ask questions to clarify as needed.
      Second, once you have the information suggest a prompt that include context, examples, and chain of thought prompting where the prompt goes step by step through the problem.
      Third, show what your response as ChatGPT would be to the prompt.
      Fourth, ask if the user has any suggestions and help them revise the prompt

etc

questions

  • whats a nice UX/design for this?
  • how to make these system/style prompts customizable and saved by user?

cmd+k type interface to easily select which providers to use

I find myself having to switch providers a lot. Preplexity/bing/bard when I need search. GPT/Claude for more normal stuff. This will only get more complex over time.

I'd wanna build a cmd+k type interface that lets you do this easily. Maybe there's an easier way to do this with just a bar at the top that's super slim with checkboxes on the side. If people like this, I can make this pretty quickly.

[Feature] make window of each URL customizable

people might want to use other chat apps, eg HuggingChat, or Vicuna or OpenAssistant.

would like to keep the number of panels to 3 (so it doesnt get too busy? but maybe we could bring it up to 6 with a second row?), but let people customize their fave chat apps for each window

however the app works by also needing a selector for the text input, and the submit button, and users aren't likely to find those on their own

easiest way is to maintain a static list of other known chat apps, that also have their input and submit selectors hardcoded.

reach goal: choices should persist esp thru version upgrades of smol menubar (so maybe store in disk?)

Bard requires an extra click on "send"

I'm on Windows. Installation went without issues. Hitting CMD + enter submits messages to ChatGPT / Bing, but for Bard, I have to click on "send" additionally. The prompt itself is synchronized. How to fix?

Can't test Claude v2 since I'm in europe.

Suggestions related to additional features

  1. Multiple Vertical Windows each with a customizable URL, all within a main Window.
  2. Each Vertical should have an + and – icon on the top right.
  3. If I click the + icon, it should produce another Vertical window on the right of the existing window, in which we can input a different URL.
  4. On clicking – the icon, it should close the current vertical window.
  5. I should be able to create a maximum 10 numbers of vertical windows, in which we can input each window with a different URL.
  6. The width of the Vertical window should be adjustable.
  7. The Vertical window should be scrollable.
  8. The main window containing Vertical windows should also be scrollable.

Copy-paste hotkeys

Something about the way you've got your hotkeys set up causes copy-paste with CTRL-C / CTRL-V to duplicate the copied text three times. This is annoying when trying to copy and paste a password into the window. I was able to bypass this problem by pasting with right-click.

My login also got rejected by OpenAI, probably because of their Auth0 CSRF token authentication system. And then they wanted me to sign in with an email link, which opened in the regular browser rather than in the menubar window.

[Looking for Contributor] New Provider: Phind.com

in #32 we added Provider modules to make it easy to add more chats. if you're new here and want an easy way to contribute, now it's a lot easier!

please claim this and send a PR for us to review!

this work is split out from #13

Getting an electron forge error

I'm getting an error when running npm build run on my M1 Mac. Has anyone else run into this error?

Electron forge was terminated: You must depend on "electron-prebuilt-compile" in your devDependencies

screenshot

[FEATURE] added styling to normalize the Bard window dimensions to match the Open #helpwanted

body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
padding: 0;
margin: 0;
overflow: hidden;
}

:root {
--actual-height: calc(100vh - 12px - 80px);
}

.myarrow {
position: relative;
padding: 12px 0 0 0;
}

.myarrow:before {
content: "";
height: 0;
width: 0;
border-width: 0 8px 12px 8px;
border-style: solid;
border-color: transparent transparent white transparent;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
}

@media (prefers-color-scheme: dark) {
.myarrow:before {
border-color: transparent transparent #343541 transparent !important;
}
}

.page {
background: #eeeeee;
width: 100%;
height: calc(100vh - 12px - 80px);
margin-top: 12px;
margin: 0 auto;
position: relative;
}

.flex {
display: flex;
border-radius: 8px;
overflow: hidden;
}

#form {
height: 80px;
width: 100%;
display: flex;
padding: 5px;
}

#form textarea {
width: 100%;
height: 80px;
resize: none;
overflow-y: auto;
padding: 0 12px;
font-size: 16px;
outline: none;
background-color: bisque;
flex-grow: 1;
}

#form button {
margin: 0 4px;
padding: 0 12px;
}

webview {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: calc(100vh - 12px - 80px);
display: inline-flex !important;
}

.gutter {
background-color: #eee;
background-repeat: no-repeat;
background-position: 50%;
}

.gutter.gutter-horizontal {
background-image: url("images/vertical-grip.png");
cursor: col-resize;
}

/* Customize the bar color for Split.js */
.split .split-content::after {
background: linear-gradient(to right, #4c6ef5, #9059ff);
}

/* Customize the bar color on hover */
.split .split-bar:hover {
background: linear-gradient(to right, #4c6fff, #9f59ff);
}

/* Additional Styling */

.page.darwin webview {
width: 100%;
height: 100%;
}

#one.split.page.darwin webview,
#two.split.page.darwin webview,
#three.split.page.darwin webview {
width: 100%;
height: 100%;
}

#one.split.page.darwin webview {
width: 1194px;
}

@media screen and (max-width: 1194px) {
#one.split.page.darwin webview {
width: 100%;
}
}

@media screen and (max-width: 1194px) and (orientation: landscape) {
#one.split.page.darwin webview {
height: 100%;
}
}

How to Install?

Can you provide details instructions or easy way for a non programmer to install it.

Thanks

Change Default to GPT 4 on chat.openai.com

I will try to implement this over the weekend if I have a chance, but would like to have a config option that makes GPT4 the default on chat.openai.com

Side note - enjoyed your demo yesterday @swyxio!

Input field not automatically activated + weird Enter behavior

Problem: if you press Command + Shift + G on MacOs, the input field is not automatically activated for typing and Enter will submit.

Expected behavior: I would expect the app to automatically activate the field for typing so that I can start writing straight away after pressing Command + Shift + G. Also, I would expect Enter to result in a line break and CMD + Enter to Submit.

Permanently Disable Claude

I do not have access to Claude. Is there a way to permanently disable it so I only see Chatgpt and Bard? I try to move it out of the screen which works fine. But then after I type something, and want to delete the previous thing that I typed, I hit command-A (to highlight the previous text to be deleted) and the Claude screen appears again.

Pastes Everything Twice

I'm running this on Windows 10 and having an issue with copy pasting into it. Anytime I paste text it copies the text twice, anyone else having this issue?

[Request for help] improve design

the superprompt box right now is kind of an ugly yellow.

what should it look like?

note: i am getting a new design done for the icon, i know it sucks haha

Allow for dock icon to be hideable

The app's dock icon is always visible while the app is open. its not necessary to have both the menu bar icon and the dock icon to show together. (unless im missing a settings option?)

[Request] Feature - UI - Allow option to toggle light/dark mode

Request: allow option to toggle light/dark mode

Apologies if this is already available and I missed it. Please let me know where to find it if that's the case.

Also, I can maybe take a stab at adding this myself if someone tells me the relevant files to look at (not too familiar with the codebase).

Perplexity Login/Sign In broken

Popup modal not displaying SSO or input field like it should. Other providers unaffected.

  • Tried using TAB + ENTER to see if I could trigger the login manually in case it was just hidden by the UI or something, but no luck.

Version 0.0.16

Current:

image

Expected:

image

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.