DEV Community

Roy J. Wignarajah
Roy J. Wignarajah

Posted on • Updated on

ChatCraft Adventures #7

This week in ChatCraft

Release 1.4

ChatCraft release 1.4 has been delayed. However, my classmates and I have been working on bug fixes, enhancements and new features.

This week has been slow compared to previous weeks. So far I've made
two Pull Requests

Pull Requests

Prompt Updating for inline KaTeX

ChatCraft can render math using the rehype-katex package, which renders KaTeX syntax. In most cases, the queried LLM will render Math in KaTeX, but sometimes inline elements do not.

My Pull Request involves a slight adjustment to the default prompt that instructs the LLM to also render any inline mathematical expressions as KaTeX by wrapping the expressions in double dollar signs.

This Pull Request still needs review and hasn't been merged, but I found it fun to work on. I'm using the OpenAI API for my college capstone project, so I've had some experience fine-tuning my prompts so the LLM (typically gpt-3.5-turbo) to respond as required.

Add Dynamic Imports for Mermaid and Math Rendering

Some packages/modules used in ChatCraft are large, and we'd like to import them dynamically. The focus of this PR was to dynamically import a few packages used for Math and Mermaid rendering:

Locally, my changes work, but when I pushed my branch to GitHub and tested my preview, ChatCraft doesn't load. This is something I hope to investigate and solve next week.

Plans for next week and, rest of the semester

This is the halfway point of my semester. At this point, I've been able to contribute small changes to ChatCraft. However, in the remainder of the semester I hope to contribute new code and features to ChatCraft. Some things I'd like to work on include WASM, and the ability to attach files to a chat.

Top comments (0)