Skip to content
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

Markdown & LaTeX rendering, code blocks w/ syntax highlighting, styled tables, headings, and lists. #95

Merged
merged 15 commits into from
Mar 15, 2024

Conversation

kaeladair
Copy link
Contributor

@kaeladair kaeladair commented Mar 14, 2024

Added Markdown & LaTeX rendering using Katex, styled tables, lists, and headers, added code blocks with syntax highlighting.

Fixes #94

Had to add to main chat prompt to ensure proper delimiters and formatting from gpt-4.

Styling is in globals.css for now, as I am not super familiar with tailwind. Easy/quick fix if it is a problem.

Screenshot 2024-03-13 at 5 44 51 PM Screenshot 2024-03-13 at 5 45 43 PM Screenshot 2024-03-13 at 5 45 57 PM

Copy link

vercel bot commented Mar 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ad-deus ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 4:51am

app/src/styles/globals.css Outdated Show resolved Hide resolved
@adamcohenhillel
Copy link
Owner

Pretty awesome stuff - will merge after resolving @Jacksonmills comments!

Introduced @tailwindcss/typography to improve text formatting and removed redundant CSS by defining a Prose component. Adjusted Chat component's padding for responsiveness. These changes enhance readability and maintainability across text elements, while also following best practices for utility-first CSS. Refactoring ensures consistency and takes advantage of Tailwind's typographical utilities. Adjusted markdown code block handling for simplicity and consistency.
@Jacksonmills
Copy link
Collaborator

@kaeladair kaeladair#2

I have a PR open on your fork that should clean up everything, however when I ask for math rendering it doesn't give it to me despite me not touching those globals

Copy link
Collaborator

@Jacksonmills Jacksonmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put in some changes as a PR on your fork, let me know what you think there, one bug with the math stuff or I just suck at prompting

…d-typography

Add typography plugin and refactor styles
@kaeladair
Copy link
Contributor Author

I put in some changes as a PR on your fork, let me know what you think there, one bug with the math stuff or I just suck at prompting

Looks great! Trying to figure out the bug and will get back to you soon

@Jacksonmills
Copy link
Collaborator

I put in some changes as a PR on your fork, let me know what you think there, one bug with the math stuff or I just suck at prompting

Looks great! Trying to figure out the bug and will get back to you soon

yeah I saw your screenshot of the equations so I tried asking for one but no luck

@kaeladair
Copy link
Contributor Author

I put in some changes as a PR on your fork, let me know what you think there, one bug with the math stuff or I just suck at prompting

Looks great! Trying to figure out the bug and will get back to you soon

yeah I saw your screenshot of the equations so I tried asking for one but no luck

Everything is working on my end, with the bug being that the GPT is responding with some markdown headers mixed with LaTeX and is doesn't render properly. Will try to prompt it.

@Jacksonmills Jacksonmills self-requested a review March 15, 2024 03:47
@adamcohenhillel
Copy link
Owner

merging!

@adamcohenhillel adamcohenhillel merged commit e153279 into adamcohenhillel:main Mar 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render Markdown and LaTeX in chat responses
3 participants