felixbade / assistant Goto Github PK
View Code? Open in Web Editor NEWWeb UI for ChatGPT API. No back-end, mobile-friendly, continuously user-tested
Home Page: https://assistant.bloat.app
License: ISC License
Web UI for ChatGPT API. No back-end, mobile-friendly, continuously user-tested
Home Page: https://assistant.bloat.app
License: ISC License
Output should be allowed to be multi line
It should be possible to specify a darke theme color: https://css-tricks.com/meta-theme-color-and-trickery/
index.js
is already 250 lines of code.
After #12, it would be powerful if old messages could be searched with e.g. GPT embeddings.
Using OpenAI tokenizer? Or if it’s complicated, just number of words.
Make it possible to ask follow up questions and iteratively form a conversation
Looking at Signal and Telegram, they have solved this issue by making sent links the same color as normal text and adding an underline. iMessage doesn’t display links at all, only the rich preview.
Signal and Telegram also have an underline in the received links. Telegram uses an accent color for the text where as Signal doesn’t.
keyCode == 13
will fix this
textbox.addEventListener('keydown', (event) => {
if (event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.shiftKey) {
event.preventDefault()
submitMessageForm()
updateTextareaSize(textbox)
}
})
It is too small. It would also be useful for the UX for stuff to be bigger in general, both for mobile and desktop usage
This would add a microphone button to the assistant UI, transcribe the text with Whisper (same API key works for that as well), and then send the text to ChatGPT. I think the original audio doesn't need to be saved, just the transcription is sufficient.
Originally suggested by @smfrue in the transcribe project.
This is quite a big feature, but the prompt + result history could be saved to the client. For example indexedDB
. There would need to be a UI to browse old prompts.
Additionally it would be nice to be able to export the history in a hybrid of machine-readable and human readable format. But that’s not strictly needed for this issue.
Even non-animated can be cool
Should be <textbox>
instead of <input type="text">
Additionally, the textbox should scale automatically and not show the resize handle
Right now the app needs to be force quit every time. Related to #12
Not sure how to do this so that the vertical position perfectly aligns with the keyboard, but it should be possible, since chat.openai.com does it.
You set the max_tokens parameter to what number?
This app doesn't work without an internet connection, so service worker is a bit funny solution. However, being able to install the app as a ”native” app on desktop would be powerful for app changing.
Add possibility to parse question directly from URL params,
url?q="hi chatgpt!"
This would make it faster to open a new conversation from ex alfred or other launcher.
Implementing #5 first probably makes sense.
The official ChatGPT web UI makes it really easy to copy individual code blocks by having copy buttons for each. Not sure if that's the way to do it, but copying code blocks should be easier.
This would allow bundling everything and removing the imports from the HTML head.
Also a floating version number in Marked is a bit sus because we have this.
For example:
It should be possible to add the app to tge home screen. While not usable without an internet connection, it would be easier to use without browser UI
https://assistant.bloat.app/#q=how%20to%20style%20%3Cinput%20type%3D%22text%22%3E
All user-supplied and AI-supplied content goes through DOMPurify before they are added to the DOM, so this shouldn't be an XSS vector, but this is still not how the app should behave.
Since the script tag is sent to the assistant, it could also make the user feel uneasy whether the script tag ended up to the DOM or not:
https://assistant.bloat.app/#q=%3Cscript%3Ealert()%3C%2Fscript%3E
At the moment the chat API gets the unsanitized text while the UI gets a sanitized one. It is not a security issue (within the scope of this project anyway), since ChatGPT allows unsanitized user input, but it's confusing.
&
, <
and >
should be escaped. There's no reason to support any kind of HTML tags in either the user's or the AI's messages – apart from what comes out of the Markdown rendering.
However, Markdown-escaped code renders correctly at the moment, and that shouldn't be broken, since it's important for code examples.
https://assistant.bloat.app/#q=how%20to%20style%20%60%3Cinput%20type%3D%22text%22%3E%60
The behind-the-scenes conversation with ChatGPT should happen in Markdown (not rendered HTML), but sanitized.
If the text is longer than what fits on the screen, it's not possible to scroll up and see the beginning of the message.
Animating the loading icon lets the user know that something is currently being actively loaded. Static three icons make the user think that nothing is happening, or that the page is frozen (essentially the same thing).
Ability to sort previous prompts via topic
Imo there is not enough contrast for good readability. Check this tool for good contrast ratio.
The same icon that's used for app icon + rounded corners and transparent background, or something
When the answer contains a code snippet add the proper styling around it for readability and easy copy paste.
What I did: entered two questions really fast before the AI had a chance to respond.
I'm expecting both of my messages to be before the responses (like in a chat if I sent two messages quicker than I got an answer for). This is how it should be.
However, I'm also expecting the assistant's responses to be ordered such that the response to the first question is on the top of the two. This is not the case here. They might be ordered by the time of response arrival, but they should be ordered by the time of request sent.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.