-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SimpleChat: a simple and dumb web front end for testing /chat/completions and /completions end points and try chat #7350
SimpleChat: a simple and dumb web front end for testing /chat/completions and /completions end points and try chat #7350
Commits on May 17, 2024
-
SimpleChat: Add a skeletal html page
Contains a div placeholder for showing chat messages till now a text-input for allowing user to enter next chat message/query to the model. a submit button to allow sending of the user entered message and chat till now to the model.
Configuration menu - View commit details
-
Copy full SHA for 69ecad2 - Browse repository at this point
Copy the full SHA 69ecad2View commit details -
SimpleChat: A js skeleton with SimpleChat class
Allows maintaining an array of chat message. Allows adding chat message (from any of the roles be it system, user, assistant, ...) Allows showing chat messages till now, in a given div element.
Configuration menu - View commit details
-
Copy full SHA for 0402a4b - Browse repository at this point
Copy the full SHA 0402a4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d3cc93 - Browse repository at this point
Copy the full SHA 1d3cc93View commit details -
SimpleChatJS: Roles Class, submitClick
Define Role class with static members corresponding to the roles. Update startme to * Get hold of the ui elements. * Attach a click handler to submit button, which adds the user input to xchats array and shows the chat messages till now in chat div element. Trap DOMContentLoaded to trigger startme
Configuration menu - View commit details
-
Copy full SHA for 70e5860 - Browse repository at this point
Copy the full SHA 70e5860View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24d348a - Browse repository at this point
Copy the full SHA 24d348aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 256e02c - Browse repository at this point
Copy the full SHA 256e02cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 639d647 - Browse repository at this point
Copy the full SHA 639d647View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce4aaeb - Browse repository at this point
Copy the full SHA ce4aaebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27268a6 - Browse repository at this point
Copy the full SHA 27268a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33bc67b - Browse repository at this point
Copy the full SHA 33bc67bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c665347 - Browse repository at this point
Copy the full SHA c665347View commit details -
Configuration menu - View commit details
-
Copy full SHA for 564469e - Browse repository at this point
Copy the full SHA 564469eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d772f6 - Browse repository at this point
Copy the full SHA 7d772f6View commit details -
SimpleChat: Diff user/assistant msgs, Make input wider
Also show a default message to user Also add some metas
Configuration menu - View commit details
-
Copy full SHA for 9942851 - Browse repository at this point
Copy the full SHA 9942851View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebe330d - Browse repository at this point
Copy the full SHA ebe330dView commit details -
SimpleChat:sh: Add simple shell script to run python3 http.server
So one needs to run the llm server locally then run this script and access it using a local browser
Configuration menu - View commit details
-
Copy full SHA for 29d2d22 - Browse repository at this point
Copy the full SHA 29d2d22View commit details -
SimpleChat:JS: Try trap enter key press wrt input text field
So user can either press submit button or press enter key
Configuration menu - View commit details
-
Copy full SHA for e62087b - Browse repository at this point
Copy the full SHA e62087bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9feb58e - Browse repository at this point
Copy the full SHA 9feb58eView commit details -
SimpleChat: Dont submit if already submitted and waiting
Also make chat the default selection wrt mode
Configuration menu - View commit details
-
Copy full SHA for 3e5edba - Browse repository at this point
Copy the full SHA 3e5edbaView commit details -
SimpleChat:JS: Handle difference in response
Try read the assistance response from appropriate field in the response got. Also examples/server seems to return the response in a slightly different field, so try account for that also.
Configuration menu - View commit details
-
Copy full SHA for aef32d9 - Browse repository at this point
Copy the full SHA aef32d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b364417 - Browse repository at this point
Copy the full SHA b364417View commit details -
Configuration menu - View commit details
-
Copy full SHA for 668b987 - Browse repository at this point
Copy the full SHA 668b987View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69817fe - Browse repository at this point
Copy the full SHA 69817feView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae52ad1 - Browse repository at this point
Copy the full SHA ae52ad1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 884adfd - Browse repository at this point
Copy the full SHA 884adfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72151aa - Browse repository at this point
Copy the full SHA 72151aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 601fedf - Browse repository at this point
Copy the full SHA 601fedfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d0a28b - Browse repository at this point
Copy the full SHA 0d0a28bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 65a56e6 - Browse repository at this point
Copy the full SHA 65a56e6View commit details
Commits on May 18, 2024
-
SimpleChat:CSS: Move style info into its own css file
To keep it simple, clean and seperate so that things are not unnecessarily cluttered.
Configuration menu - View commit details
-
Copy full SHA for ebd5e71 - Browse repository at this point
Copy the full SHA ebd5e71View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1a2f36 - Browse repository at this point
Copy the full SHA a1a2f36View commit details -
SimpleChat:JS: Try ensure the last entry in chat is visible
Needed because now only the chat div is scrollable and not the full page. In last commit the chat div size was fixed to 75% vertical height, so the full page no longer scrolls, so the old bring user-input element to view wont work, instead now the last element in the chat div should be brought into view.
Configuration menu - View commit details
-
Copy full SHA for a944ce7 - Browse repository at this point
Copy the full SHA a944ce7View commit details -
SimpleChat:JS: bottom of element visible, Set focus to user input
As the generated text could be multiple lines and occupy more space that the full scrollable div's vertical space, make the bottom of the last element (which can be such a generated text) in the div visible by scrolling. Ensure that the user input box has focus
Configuration menu - View commit details
-
Copy full SHA for 6eb1e0f - Browse repository at this point
Copy the full SHA 6eb1e0fView commit details -
SimpleChat: Update notes a bit. Try keep browser happy
Avoid browser quirk mode with DOCTYPE. Help with accessibility a bit by specifying the language explicitly. Specify the char encoding explicitly, inturn utf-8 is a safe bet, even with intermixing of languages if reqd in future. Add a cache-control http-equiv meta tag, which in all probability will be ignored. Defer js loading and execution, just for fun and future, not that critical here as it stands now.
Configuration menu - View commit details
-
Copy full SHA for 5a5f6ab - Browse repository at this point
Copy the full SHA 5a5f6abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 676053f - Browse repository at this point
Copy the full SHA 676053fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7905f2f - Browse repository at this point
Copy the full SHA 7905f2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5976126 - Browse repository at this point
Copy the full SHA 5976126View commit details
Commits on May 19, 2024
-
SimpleChat:HTML: Add viewport meta for better mobile friendliness
Without this the page content may look too small.
Configuration menu - View commit details
-
Copy full SHA for c191e47 - Browse repository at this point
Copy the full SHA c191e47View commit details
Commits on May 20, 2024
-
SimpleChat:HtmlCss: Cleanup UI flow
set margin wrt vmin rather than vw or vh so portrait/landscape ok. Use flex and flex-grow to put things on the same line as well as distribute available space as needed. Given two main elements/line so it remains simple. In each line have one element with grows and one sits with a basic comfortably fixed size.
Configuration menu - View commit details
-
Copy full SHA for c88088c - Browse repository at this point
Copy the full SHA c88088cView commit details -
Configuration menu - View commit details
-
Copy full SHA for dfadac7 - Browse repository at this point
Copy the full SHA dfadac7View commit details -
SimpleChat: Make vertical layout better responsive (flex based)
Also needed to make things cleaner and properly usable whether landscape or portrait, after changing to multiline textarea rather than single line user input. Avoid hardcoding the chat-till-now display area height, instead make it a flex-growable within a flex column of ui elements within a fixed vertical area.
Configuration menu - View commit details
-
Copy full SHA for 6597faf - Browse repository at this point
Copy the full SHA 6597fafView commit details -
SimpleChat: Rename simplechat.html to index.html, update readme
Instead of providing a seperate shell script, update the readme wrt how to run/use this web front end.
Configuration menu - View commit details
-
Copy full SHA for e5000cd - Browse repository at this point
Copy the full SHA e5000cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fc607f - Browse repository at this point
Copy the full SHA 3fc607fView commit details -
Configuration menu - View commit details
-
Copy full SHA for af62197 - Browse repository at this point
Copy the full SHA af62197View commit details -
SimpleChat:JS: MultiChat initial skeleton
Will help maintain multiple independent chats in future
Configuration menu - View commit details
-
Copy full SHA for 9b97fea - Browse repository at this point
Copy the full SHA 9b97feaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c1a9f4 - Browse repository at this point
Copy the full SHA 5c1a9f4View commit details -
SimpleChat:JS:Keep MultiChatUI simple for now
Worry about different chats with different servers for later.
Configuration menu - View commit details
-
Copy full SHA for fcf2af9 - Browse repository at this point
Copy the full SHA fcf2af9View commit details -
SimpleChat:JS: Move handle submit into MultiChat, build on same
Create an instance of MultiChatUI and inturn a instance of chat session, which is what the UI will inturn work on.
Configuration menu - View commit details
-
Copy full SHA for 8ef1aa9 - Browse repository at this point
Copy the full SHA 8ef1aa9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7be6aeb - Browse repository at this point
Copy the full SHA 7be6aebView commit details
Commits on May 21, 2024
-
SimpleChat: Move ui elements into MultiChatUI, Update el IDs
Move ui elements into MultiChatUI, so that current handleUserSubmit doesnt need to take the element arguments. Also in future, when user is allowed to switch between different chat sessions, the UI can be updated as needed by using the elements in UI already known to MultiChatUI instance. Rename the element ids' so that they follow a common convention, as well as one can identify what the element represents in a more consistant manner.
Configuration menu - View commit details
-
Copy full SHA for 1cd10ae - Browse repository at this point
Copy the full SHA 1cd10aeView commit details -
SimpleChat:MCUI:Show available chat sessions, try switch btw them
Previous commits brought in / consolidated existing logic into MultiChatUI class. Now start adding logic towards multichat support * show buttons indicating available chat sessions * on sessin button click, try switch to that session
Configuration menu - View commit details
-
Copy full SHA for 1b82f22 - Browse repository at this point
Copy the full SHA 1b82f22View commit details -
SimpleChat:MCUI: Store and use current chat session id
Also allow to switch chat session optionally, wrt some of the related helpers. setup for two chat sessions by default.
Configuration menu - View commit details
-
Copy full SHA for 928cc36 - Browse repository at this point
Copy the full SHA 928cc36View commit details -
SimpleChat:MCUI: Delay enabling user-input to avoid race
Re-enable user-input, only after response to a user query has been updated to the chat-div. This ensures that if user tries to switch chat session, it wont be allowed till chat-request-response flow is done.
Configuration menu - View commit details
-
Copy full SHA for d57274b - Browse repository at this point
Copy the full SHA d57274bView commit details -
SimpleChat: Take care of system prompt
Helper to get the latest system prompt and inturn use same to set the system prompt ui, when switching. Ensure that system prompt is set if and when enter key is pressed.
Configuration menu - View commit details
-
Copy full SHA for 7297dda - Browse repository at this point
Copy the full SHA 7297ddaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3458d2f - Browse repository at this point
Copy the full SHA 3458d2fView commit details -
SimpleChat:MCUI: Allow selected chat-session btn to be highlighted
Also have a general helper for setting class of children.
Configuration menu - View commit details
-
Copy full SHA for b9f9c0e - Browse repository at this point
Copy the full SHA b9f9c0eView commit details -
Show system prompt in chat space, when it is set by pressing enter, as a feedback to user. Alert user, if they try to switch chat session in the middle of waiting for a response from the ai model.
Configuration menu - View commit details
-
Copy full SHA for 68ef740 - Browse repository at this point
Copy the full SHA 68ef740View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a40719 - Browse repository at this point
Copy the full SHA 2a40719View commit details -
SimpleChat:MCUI: Support for new chat sessions
Also a general create button helper.
Configuration menu - View commit details
-
Copy full SHA for 14083d1 - Browse repository at this point
Copy the full SHA 14083d1View commit details -
SimpleChat:MCUI: CreateSessionBtn helper, use wrt NewChat
Also fix a oversight wrt using stale data wrt the list of chat sessions.
Configuration menu - View commit details
-
Copy full SHA for 6c71277 - Browse repository at this point
Copy the full SHA 6c71277View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3405ea - Browse repository at this point
Copy the full SHA d3405eaView commit details -
SimpleChat:MCUI:CornerCases:Skip new chat, show only if current
Skip NewChat if user cancels or if one waiting for response from the ai model. Dont show a chat with newly got ai model response, if current chat session has changed, some how. Chat session shouldnt be allowed to change, if there is a pending response, but still as a additional sanity check.
Configuration menu - View commit details
-
Copy full SHA for c2e8d62 - Browse repository at this point
Copy the full SHA c2e8d62View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb848b2 - Browse repository at this point
Copy the full SHA fb848b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d87c50 - Browse repository at this point
Copy the full SHA 1d87c50View commit details