forked from patrikzudel/PatrikZeros-ChatGPT-API-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
698a744
commit b72b11e
Showing
35 changed files
with
3,345 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["svelte.svelte-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
**[](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:** | ||
**[](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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.