GithubHelp home page GithubHelp logo

svelte-gpt's Introduction

What?

Svelte GPT is a Chat UI for interacting with language model APIs.

It runs in your browser on localhost:1337.

Why?

  • πŸš€ Launch a new chat from anywhere (via Alfred)
    • I.e. You can input a prompt + select which model to use via URL query parameters
    • This isn't possible on chat.openai.com
  • πŸ’‘ Use any model
  • βš™οΈ Control the model settings
  • πŸ“ Control the system_prompt
  • πŸ† Fork chats
    • Surprisingly useful feature!
    • I don't think anyone has done this yet
  • πŸ“ Automatic model switching when the context window is exceeded
    • I.e. Intelligently switches from gpt-3.5-turbo to gpt-3.5-turbo-16k at the 4096 token limit
  • πŸ’° Save $25/mo if you don't actually use ChatGPT that much

Install

  1. Download the latest Pocketbase release

    • Put the pocketbase executable in the /pocketbase/ folder
    • Run pocketbase for the first time to initialise it
      • On MacOS you may need to do ⌘+Click -> Open -> Confirm open
    • Close the terminal window once it's done
  2. Create a .env file in the root directory, add OPENAI_TOKEN=<your_token_goes_here> and save:

OPENAI_TOKEN=sk-YoUrOpEnAiAcCeSsToKeNtHaTyOuGeTfRoMtHeIrWeBsItE
  1. Install dependencies
npm install
  1. Compile the SvelteKit app:
npm run build
  1. Launch both Pocketbase and Svelte GPT with the shell script:
./start.sh
  • (Note: You can also run Svelte GPT in dev mode, with live reloading, by running ./start.sh dev)
  1. Go to http://localhost:1336/_/ (⌘+click the link) and add an admin email + password to finish setting up Pocketbase

  2. Go to http://localhost:1337 and start chatting.

Please Note

This isn't finished, production ready code - it's a personal project that I originally had no intention of sharing. I could be persuaded to develop it properly, but it works for my needs and I'm currently focused on other things!

svelte-gpt's People

Contributors

joekelly10 avatar

Stargazers

Neven Ε abijan 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.