Open
Conversation
FE: Generates/Reads UUID from URL. Sends UUID along with prompt. BE: Added a global dictionary "conversations" conversations.messages is a list of messages conversations.summary is a AI generated summary of the messages in the conversation
FE: Fetches the conversation from the UUID Transforms the messages to the correct format that the page expects BE: Create a history prompt from the conversation so that the response from a prompt follows the context of the conversation Endpoint to return all messages from a conversation
use icons for user/bot and for send button make the chat window easier on the eyes separate user/bot by gray
- add images to conversation history - return images with conversation responses
- swap out ImagePreview for img - Change user messages to have slated background instead of bot messages
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved Website: https://test.isebarn.com
An overview of your thoughts on the current project/design, how you improved it, and
what your process was.
My thoughts
The project when I started
I'm not a huge fan of materialUI, or any UI kits. I've used them a lot on the past and they're great to prototype stuff, because the components are all flowing in the same style, but as soon as you need something to look a bit custom, they pose a tremendous difficulty. Since I started using Tailwind (which is fairly recently) I've picked it up fast and it is much easier to work with as soon as you get some momentum with it.
I've specialised in Flask for the past ~6 years. I've never used FastAPI, but it's very similar to Flask it seems, but it looks very good and I suspect it might be even better than Flask. I should research it a bit.
There's not much to say about the "design", it is still in it's infancy, there is no database, no directory structure. However there are tests which I like, it's always very tempting to delay writing tests.
My process
Heres my timeline
. I started up the entire system and tested around for a minute
. I looked over the code a bit to try to fit it in my head
. I reviewed the things requested and made a list of things I wanted to do
. Split that list into backend and frontend
. Decided to allocate 2-3 hours on backend and 2-3 hours on frontend
. Picked out a set of backend/frontend tasks and ordered them in order of importance
. Got to work
Github: https://github.com/isebarn/
FE improvements
taotensor/logosfor the chat "bot" messagesBE improvements
conversationsglobal variable that stores all chats:uuidFuture Improvement Ideas:
What I'd like to do in the backend
Convert the naurons.api into a separate service that can be launched individually with docker so that the fastapi has an array of available AI's to communicate with, to minimize wait time for users
Database to store chats (right now I just added a dictionary as a global variable).
Optionally redis or some sort of fast access storage for chats that are ongoing
Refactor a bit.
I just tossed all methods into the same file.
Normally I would never do that but since I'm working with a global dictionary for the conversations I didn't really have a choice.
But I can say that I would structure somewhere along the lines of this:
prompt_utils.pyutils.pydata.py(some database layer)Research if a service like Pusher would do better than StreamingResponse, but that might be better suited once there is more traffic.
Set up error monitoring like Sentry
What I'd like to do in the frontend
Functionality ideas