Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikzudel committed Mar 7, 2023
1 parent 698a744 commit b72b11e
Show file tree
Hide file tree
Showing 35 changed files with 3,345 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["svelte.svelte-vscode"]
}
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@


<p style="text-alin: left; font-weight:700; font-size: 3rem;margin-bottom:0px;padding-right:10rem;text-align:center; ">
PatrikZero's
</p>
<p style="text-align:center; font-weight:700; font-size: 4rem; line-height: 2rem; padding-bottom: 2rem; margin-top: 0px; padding-top: 0px;">ChatGPT UI</p>

#### Static website that allows you to use your OpenAI API key for the same experience as you get with ChatGPT!

## πŸ“– How to use
- Visit the GitHub Pages release [here](https://chat.patrikzudel.me/).
- Or to run locally, pull the repository and run ```npm run dev```
- **If you don't know your API key make one here and don't forget to setup billing for it to work.**


## ⚑ Features
- All features that are in ChatGPT
- Ability to use your own OpenAI API key.
- No minimum cost, great for students!
- Cheaper than ChatGPT Premium for most users.

- Token / cost saving features:
- Send message without history.
- When you are asking a sequence of unrelated questions, don't bother sending the whole history!

- Summarize the chat, useful if you have a message over the 4k token limit but you want to keep the context.

- Ability to set a default system message.
- This sets the role of the assistant, and provides it additional information
- Example uses:
- For telling the assistant which technology stack you're using so you don't have to repeat yourself.
- For roleplaying a character.

- You can also switch between it being a "System" message or "User" message for finer control.
- "User" has stronger impact from what I've tried.


## πŸ’¬ Reasonings
I've been frustrated with **ChatGPT** **slowdowns**, **errors**, **constant reloading** and lack of **some features**. I was about to pay for Premium and noticed they released an API that is going to be much **cheaper** for most users. I also wanted to learn JS + a framework for a while now and this seemed like the perfect opportunity to learn. Hope you find it useful!

## πŸ“– How it works

Stack: Svelte, Tailwind, Typescript.

Just makes calls to the OpenAI API using the key specified in settings.

## πŸ€ Supporters

**[!["Buy Me A Ramen"](https://raw.githubusercontent.com/patrikzudel/patrikzudel/main/ramen.png)](https://www.buymeacoffee.com/patrikzero)**

> If you like this project and would like to support me, feel free to buy me a ramen! 🍜🍜🍜
> Or **Paypal:**
**[!["Buy Me A Ramen"](https://raw.githubusercontent.com/patrikzudel/patrikzudel/main/ramenpaypal.png)](https://ko-fi.com/patrikzudel)**

## πŸ“‹ To be added

- [ ] Google search using embeddings.
- [ ] PDF search using embeddings.

## πŸ“ƒ Dependencies
- OpenAI
- Svelte-markdown
- sse.js

---

πŸ’»β€πŸ² by [Patrik Ε½ΓΊdel](https://twitter.com/PatrikZero)
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/chat.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit b72b11e

Please sign in to comment.