mckaywrigley / chatbot-ui

Come join the best place on the internet to learn AI skills. Use code "chatbotui" for an extra 20% off.
https://JoinTakeoff.com
MIT License
28.35k stars 7.89k forks source link

Cannot convert inline math fomula #1223

Open jhchundev opened 8 months ago

jhchundev commented 8 months ago

I have deployed it to Azure and am using it. There is an issue where inline formulas are not converted correctly. I would like to try to fix it myself, but if you know the cause, it would be helpful if you could fix it.

[Evidence] ChatGPT

image

Gemini

image

I think other models can occur same problem

juanpablogd commented 8 months ago

Test with Openchat 3.5 image

jhchundev commented 8 months ago

@juanpablogd I found that sometimes this feature works and sometimes it doesn't. Works Properly

image

Now Works

image
mckaywrigley commented 8 months ago

If anyone fixes this make a PR and I'll merge.

We use remarkMath in the message-markdown.tsx component which I though handled it, but obviously it must not be working correctly.

SyedMuzamilM commented 8 months ago

Will take a look into this. Will see if i can find the issues.

SwiftDev29 commented 4 months ago

Were u able to resolve this

logancyang commented 3 weeks ago

Anybody has a solution to this?

Some models like Claude directly return rendered equations from their backend, so it was quite misleading to me, I thought it was processed by remarkMath. It was not. Need to dig deeper.