Skip to content

Commit

Permalink
Changelogs (#131)
Browse files Browse the repository at this point in the history
* Tutor-GPT 0.5.0 (#124)

* Tracing (#60)

* Tracing to separate conversations

* Basic Postgres Connection via Supabase

* MVP Postgres Backed Chat Message History

* Full binary install or psycopg3

* Use Supabase directly to avoid issues with postgres connections

* .env.template update

* 0.3.0 Long Term Memory (#62)

* Add reply to discord and limit chat history to 10 messages

* reverse returned messages and cleanup comments

* Update changelog

* increase cache limit

* Switch to Azure OpenAI

* Changelog

* fix: update link to more recent blog post

* Sanitize thoughts before sending them in the thought's channel (#65)

* LayeredLRU Cache (#69)

* Make BloomChain a static class

* MVP Layered LRU Cache using Postgres

* Remove testing variables

* Async Mutex Lock on Cache

* Stateless bug (#70)

* Dynamic model switching

* Fix hardcoding and add recovery logic for conversation tables

* Add support for multiple conversations

* Fix merge errors

* Fix merge errors 2

* fix: top_p 0.5 to address gibberish

* Custom Web UI (#76)

* init nextjs

* fast api init

* styling and thoughts

* streaming updates

* connect to api

* Add thoughts to the web UI

* Refactor input to be a form for UX (e.g. pressing enter sends)

* typing and thoughts

* Refactor input to be a form for UX (e.g. pressing enter sends)

* Revert "Merge remote-tracking branch 'origin/custom-web' into custom-web"

This reverts commit 1eae747.

* Skeleton Multiple Chat Window UI

* MVP Layout

* Tested Discord and Skeleton FastAPI

* Add, Delete, and Set Conversations

* Get and send messages

* Edit message names

* Local serving from FastAPI via static export

* Deployment strategy for static files

* Separate out apps

* Vercel Deployment with Action

* Re-add discord to fly.toml

---------

Co-authored-by: hyusap <[email protected]>
Co-authored-by: Jacob Van Meter <[email protected]>

* Fix Github Action Workflow

* Fix Github Action Workflow

* add user prediction function

* Honcho Changes (#77)

* init nextjs

* fast api init

* styling and thoughts

* streaming updates

* connect to api

* Add thoughts to the web UI

* Refactor input to be a form for UX (e.g. pressing enter sends)

* typing and thoughts

* Refactor input to be a form for UX (e.g. pressing enter sends)

* Revert "Merge remote-tracking branch 'origin/custom-web' into custom-web"

This reverts commit 1eae747.

* Skeleton Multiple Chat Window UI

* MVP Layout

* Tested Discord and Skeleton FastAPI

* Add, Delete, and Set Conversations

* Get and send messages

* Edit message names

* Local serving from FastAPI via static export

* Deployment strategy for static files

* Separate out apps

* Vercel Deployment with Action

* Re-add discord to fly.toml

* Honcho Stream

* Honcho Stream

---------

Co-authored-by: hyusap <[email protected]>
Co-authored-by: Jacob Van Meter <[email protected]>

* Social Graph Changes

* Authentication Form Styling

* Working Auth

* Stylistic changes

* Address all linting errors

* Naive Route Protection

* Fly minimum machines

* Open Graph Image Changes

* Remove anonymous honcho usage, fix opengraph (#80)

* Remove anonymous honcho usage, fix opengraph

* Remove extra excess logging and comment

* UI tweaks (#81)

* Remove anonymous honcho usage, fix opengraph

* Remove extra excess logging and comment

* I hate typescript

* UI tweaks (#82)

* Remove anonymous honcho usage, fix opengraph

* Remove extra excess logging and comment

* I hate typescript

* Open Graph, Block chat, delete convo

* Sign Up UI

* Sign Up UI 2

* Change open graph image

* Open Graph Fix

* Remove Streamlit

* UI tweaks (#84)

* Remove anonymous honcho usage, fix opengraph

* Remove extra excess logging and comment

* I hate typescript

* Open Graph, Block chat, delete convo

* Sign Up UI

* Sign Up UI 2

* Change open graph image

* Remove native prompts for sweetalert

* Changelog

* Remove Honcho for discord

* Web fixes (#89)

* seperation between sidebar and window + formatting

* make app pwa downloadable

* move to new chat on button press

* remove router

* feat: Refactor code to use MarkdownWrapper component

- Refactored the code in the `Home` component to replace usages of `ReactMarkdown` and `SyntaxHighlighter` with the new `MarkdownWrapper` component.
- Updated the `Home` component to pass the `text` prop to the `MarkdownWrapper` component for each message.
- Added a new component `MarkdownWrapper` to handle rendering markdown text with syntax highlighting.
- Removed unused imports from the `page.tsx` file, including `ReactMarkdown`, `SyntaxHighlighter`, and `dark` styles.
- Also removed unused imports from the `sidebar.tsx` file, including `useState` import.

* Optimization (#96)

* Usable without honcho and move metadata to creation points

* Remove unused psycopg code

* Add Sentry instrumentation

* Sentry to python

* Update env

* Optimization (#98)

* Usable without honcho and move metadata to creation points

* Remove unused psycopg code

* Add Sentry instrumentation

* Sentry to python

* Update env

* Sentry & Posthog integration on web

* Linting Errors

* add latex support and incentive it (#104)

* prevent unallowed messages (#111)

* implement autoscroll (#112)

* implement autoscroll
Refactored imports in "page.tsx" to improve readability and maintainability. Updated the type of the "input" ref to be more specific. Added a new state and ref to track the scroll position of the message container. Set up an event listener to update the state when the scroll position changes. Made adjustments to the scroll position in certain event handlers.

* update scroll

---------

Co-authored-by: Vineeth Voruganti <[email protected]>

* ✨ add multiline support (#118)

* ♻️ refactor all of the api stuff (#119)

* ♻️ refactor all of the api stuff

a redo of the old refactor branch, but cleaner.
moved all api calls to api.ts and supabase.ts

* Minor Bug Fixes

- Add `build-essential` to dockerfile
- Fix signin button size
- Add await for signout
- Force re-render on conversation name change

---------

Co-authored-by: Vineeth Voruganti <[email protected]>

* ✨ implement dark mode (#120)

automatically check for system mode
manual control via animated thingy

Co-authored-by: Vineeth Voruganti <[email protected]>

* Documentation (#121)

* README update and start of supabase plus making next buildable

* Supabase Local Setup and README additions

* Update web .env template and note on supabase local auth

* Force redirect for unauthenticated and add posthog events (#122)

* Update version

* Static banner

---------

Co-authored-by: vintro <[email protected]>
Co-authored-by: Jacob Vanmeter <[email protected]>
Co-authored-by: hyusap <[email protected]>
Co-authored-by: vintro <[email protected]>

* Changelogs

---------

Co-authored-by: vintro <[email protected]>
Co-authored-by: Jacob Vanmeter <[email protected]>
Co-authored-by: hyusap <[email protected]>
Co-authored-by: vintro <[email protected]>
  • Loading branch information
5 people authored Dec 12, 2023
1 parent 40c0a5a commit 417e1ae
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 104 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.5.1] - 2023-12-12

### Added

- Dark mode
- Web Caching
- LateX Support
- Multiline support for chat textbox

### Changed

- Required Sign In
- No A/B for Honcho
- Error handling for content filter

### Security

- Update Langchain version to ^0.0.348
- Update OpenAI Package to ^1.3.8


## [0.4.1] – 2023-09-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tutor-gpt
![Static Badge](https://img.shields.io/badge/Version-0.4.0-blue)
![Static Badge](https://img.shields.io/badge/Version-0.5.1-blue)
[![Discord](https://img.shields.io/discord/1076192451997474938?logo=discord&logoColor=%23ffffff&label=Bloom&labelColor=%235865F2)](https://discord.gg/bloombotai)
![GitHub License](https://img.shields.io/github/license/plastic-labs/tutor-gpt)
![GitHub Repo stars](https://img.shields.io/github/stars/plastic-labs/tutor-gpt)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tutor-gpt"
version = "0.5.0"
version = "0.5.1"
description = "LangChain LLM application. Dynamic few-shot metaprompting for the task of tutoring."
authors = ["vintro <[email protected]>", "VVoruganti <[email protected]"]
readme = "README.md"
Expand Down
102 changes: 51 additions & 51 deletions www/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,8 @@ export default function Home() {

return (
<main
className={`flex h-[100dvh] w-screen flex-col pb-[env(keyboard-inset-height)] text-sm lg:text-base overflow-hidden relative ${
isDarkMode ? "dark" : ""
}`}
className={`flex h-[100dvh] w-screen flex-col pb-[env(keyboard-inset-height)] text-sm lg:text-base overflow-hidden relative ${isDarkMode ? "dark" : ""
}`}
>
<Sidebar
conversations={conversations || []}
Expand Down Expand Up @@ -266,59 +265,60 @@ export default function Home() {
className="flex flex-col flex-1 overflow-y-auto lg:px-5 dark:text-white"
ref={messageContainerRef}
>
{messagesLoading || messages === undefined ? (
<MessageBox loading />
) : (
messages.map((message, i) => (
<MessageBox isUser={message.isUser} key={i}>
<MarkdownWrapper text={message.text} />
</MessageBox>
))
)}
</section>
<form
id="send"
className="flex p-3 lg:p-5 gap-3 border-gray-300"
onSubmit={(e) => {
{
messagesLoading || messages === undefined ? (
<MessageBox loading />
) : (
messages.map((message, i) => (
<MessageBox isUser={message.isUser} key={i}>
<MarkdownWrapper text={message.text} />
</MessageBox>
))
)
}
</section >
<form
id="send"
className="flex p-3 lg:p-5 gap-3 border-gray-300"
onSubmit={(e) => {
e.preventDefault();
if (canSend && input.current?.value) {
posthog.capture("user_sent_message");
chat();
}
}}
>
{/* TODO: validate input */}
<textarea
ref={input}
placeholder="Type a message..."
className={`flex-1 px-3 py-1 lg:px-5 lg:py-3 bg-gray-100 dark:bg-gray-800 text-gray-400 rounded-2xl border-2 resize-none ${canSend ? " border-green-200" : "border-red-200 opacity-50"
}`}
disabled={!canSend}
rows={1}
onKeyDown={(e) => {
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
if (canSend && input.current?.value) {
posthog.capture("user_sent_message");
chat();
}
}}
>
{/* TODO: validate input */}
<textarea
ref={input}
placeholder="Type a message..."
className={`flex-1 px-3 py-1 lg:px-5 lg:py-3 bg-gray-100 dark:bg-gray-800 text-gray-400 rounded-2xl border-2 resize-none ${
canSend ? " border-green-200" : "border-red-200 opacity-50"
}`}
disabled={!canSend}
rows={1}
onKeyDown={(e) => {
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
if (canSend && input.current?.value) {
posthog.capture("user_sent_message");
chat();
}
}
}}
/>
<button
className="bg-dark-green text-neon-green rounded-full px-4 py-2 lg:px-7 lg:py-3 flex justify-center items-center gap-2"
type="submit"
>
<FaPaperPlane className="inline" />
</button>
</form>
</div>
<Thoughts
thought={thought}
setIsThoughtsOpen={setIsThoughtsOpen}
isThoughtsOpen={isThoughtsOpen}
}
}}
/>
</main>
<button
className="bg-dark-green text-neon-green rounded-full px-4 py-2 lg:px-7 lg:py-3 flex justify-center items-center gap-2"
type="submit"
>
<FaPaperPlane className="inline" />
</button>
</form>
</div >
<Thoughts
thought={thought}
setIsThoughtsOpen={setIsThoughtsOpen}
isThoughtsOpen={isThoughtsOpen}
/>
</main >
);
}
85 changes: 43 additions & 42 deletions www/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,12 @@ export default function Sidebar({

return (
<div
className={`fixed lg:static z-20 inset-0 flex-none h-full w-full lg:absolute lg:h-auto lg:overflow-visible lg:pt-0 lg:w-60 xl:w-72 lg:block lg:shadow-lg border-r border-gray-300 dark:border-gray-700 ${
isSidebarOpen ? "" : "hidden"
}`}
className={`fixed lg:static z-20 inset-0 flex-none h-full w-full lg:absolute lg:h-auto lg:overflow-visible lg:pt-0 lg:w-60 xl:w-72 lg:block lg:shadow-lg border-r border-gray-300 dark:border-gray-700 ${isSidebarOpen ? "" : "hidden"
}`}
>
<div
className={`h-full scrollbar-trigger overflow-hidden bg-white dark:bg-gray-950 dark:text-white sm:w-3/5 w-4/5 lg:w-full flex flex-col ${
isSidebarOpen ? "fixed lg:static" : "sticky"
} top-0 left-0`}
className={`h-full scrollbar-trigger overflow-hidden bg-white dark:bg-gray-950 dark:text-white sm:w-3/5 w-4/5 lg:w-full flex flex-col ${isSidebarOpen ? "fixed lg:static" : "sticky"
} top-0 left-0`}
>
{/* Section 1: Top buttons */}
<div className="flex justify-between items-center p-4 gap-2 border-b border-gray-300 dark:border-gray-700">
Expand All @@ -143,44 +141,47 @@ export default function Sidebar({

{/* Section 2: Scrollable items */}
<div className="flex flex-col flex-1 overflow-y-auto divide-y divide-gray-300 dark:divide-gray-700">
{conversations.length > 0
? conversations.map((cur, i) => (
<ConversationTab
conversation={cur}
select={() => setConversationId(cur.conversationId)}
selected={conversationId === cur.conversationId}
edit={() => editConversation(cur)}
del={() => deleteConversation(cur)}
key={i}
/>
))
: Array.from({ length: 5 }).map((_, i) => (
<ConversationTab loading key={i} />
))}
</div>
{
conversations.length > 0
? conversations.map((cur, i) => (
<ConversationTab
conversation={cur}
select={() => setConversationId(cur.conversationId)}
selected={conversationId === cur.conversationId}
edit={() => editConversation(cur)}
del={() => deleteConversation(cur)}
key={i}
/>
))
: Array.from({ length: 5 }).map((_, i) => (
<ConversationTab loading key={i} />
))
}
</div >

{/* Section 3: Authentication information */}
<div className="border-t border-gray-300 dark:border-gray-700 p-4 w-full">
{/* Replace this with your authentication information */}
{session ? (
<button
className="bg-neon-green text-black rounded-lg px-4 py-2 w-full"
onClick={async () => {
await signOut();
location.reload();
}}
>
Sign Out
{/* Section 3: Authentication information */ }
< div className = "border-t border-gray-300 dark:border-gray-700 p-4 w-full" >
{/* Replace this with your authentication information */ }
{
session ? (
<button
className="bg-neon-green text-black rounded-lg px-4 py-2 w-full"
onClick={async () => {
await signOut();
location.reload();
}}
>
Sign Out
</button>
) : (
<Link href={"/auth"}>
<button className="bg-neon-green text-black rounded-lg px-4 py-2 w-full">
Sign In
</button>
) : (
<Link href={"/auth"}>
<button className="bg-neon-green text-black rounded-lg px-4 py-2 w-full">
Sign In
</button>
</Link>
</Link>
)}
</div>
</div>
</div>
</div >
</div >
);
}
}
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "www",
"version": "0.1.0",
"version": "0.5.1",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
16 changes: 8 additions & 8 deletions www/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export class Conversation {
async getMessages() {
const req = await fetch(
`${this.api.url}/api/messages?` +
new URLSearchParams({
conversation_id: this.conversationId,
user_id: this.api.userId,
})
new URLSearchParams({
conversation_id: this.conversationId,
user_id: this.api.userId,
})
);
const { messages: rawMessages } = await req.json();
// console.log(rawMessages);
Expand Down Expand Up @@ -146,10 +146,10 @@ export class API {
async getMessages(conversationId: string) {
const req = await fetch(
`${this.url}/api/messages?` +
new URLSearchParams({
conversation_id: conversationId,
user_id: this.userId,
})
new URLSearchParams({
conversation_id: conversationId,
user_id: this.userId,
})
);
const { messages: rawMessages } = await req.json();
// console.log(rawMessages);
Expand Down

0 comments on commit 417e1ae

Please sign in to comment.