psugihara / FreeChat

llama.cpp based AI chat app for macOS
https://www.freechat.run
MIT License
402 stars 34 forks source link

Don't format user messages as Markdown #39

Closed verhovsky closed 6 months ago

vercel[bot] commented 6 months ago

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

Name Status Preview Comments Updated (UTC)
free-chat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2023 10:17pm
psugihara commented 6 months ago

W00t it works, good job. Thanks for the contribution! Can you say a bit about why make this change so we have reference in the PR? I think the idea was to make it more idiomatic but now that I'm looking at how GitHub, discord, chatGPT work I'm not sure.

before

Screenshot 2023-12-18 at 4 13 31 PM

after

Screenshot 2023-12-18 at 4 13 14 PM
verhovsky commented 6 months ago

Because the code isn't formatted in the text box while you're typing it, so it's a bit unexpected to format it on submission. Also then If my first message is like "Hello *world*" it will format differently in the sidebar and in the chat. Discord formats the text in the text box as you're typing it so you're not rolling the dice on formatting when you submit a message. GitHub similarly has a Preview.

Most importantly though, chatgpt works this way:

Screenshot 2023-12-19 at 01 54 20

though it might make more sense for chatgpt because it doesn't help the model. Formatting user input with markdown probably doesn't help local LLM models that much as well.

If you like code formatting user input, you don't have to accept the PR, I won't be offended one bit

psugihara commented 6 months ago

cool thank you, i think that's good reasoning (especially the chatGPT example as that's a very successful + similar ux model). can revisit if we add preview / live transformation as you type down the line.