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

latex公式显示 #2651

Closed
3 of 17 tasks
fomalhaut1998 opened this issue May 25, 2024 · 15 comments · Fixed by lobehub/lobe-ui#168
Closed
3 of 17 tasks

latex公式显示 #2651

fomalhaut1998 opened this issue May 25, 2024 · 15 comments · Fixed by lobehub/lobe-ui#168
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@fomalhaut1998
Copy link

📦 部署环境

  • Official
  • Official Preview
  • Vercel / Zeabur / Sealos
  • Docker
  • Other

📌 软件版本

v0.161.16

💻 系统环境

  • Windows
  • macOS
  • Ubuntu
  • Other Linux
  • iOS
  • Android
  • Other

🌐 浏览器

  • Chrome
  • Edge
  • Safari
  • Firefox
  • Other

🐛 问题描述

image
如图公式没有正确显示。

📷 复现步骤

如图让其输出一个公式即可

🚦 期望结果

应该按照正确的方式渲染出latex公式

📝 补充信息

暂无

@fomalhaut1998 fomalhaut1998 added the 🐛 Bug Something isn't working | 缺陷 label May 25, 2024
@lobehubbot
Copy link
Member

👀 @fomalhaut1998

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@sanbei011
Copy link

I have a similar problem.

@Sun-drenched
Copy link

我想这应该是一个偶发问题,可能和大模型输出的公式格式不一定每一次都很标准有关。过去两周时间,以我的经验,大概有10%的概率触发无法正常显示,但大多数时候通过重新生成回答可以解决。我刚刚让gpt-4o生成了一个latex格式的公式给我,可以正常显示(桌面端/0.161.19)

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I think this should be an occasional problem, and it may be related to the fact that the formula format output by large models is not necessarily standard every time. In the past two weeks, based on my experience, there is about a 10% chance that the trigger will not display properly, but most of the time it can be solved by regenerating the answer. I just asked gpt-4o to generate a formula in latex format for me, which can be displayed normally (desktop/0.161.19)

@fomalhaut1998
Copy link
Author

image
image
这是GPT-4o-2024-05-13和claude-3-opus-20240229生成的公式,通过重新生成也无法正确渲染,似乎从来都不能正确显示!
image
而Gemini-1.5-pro的公式则可以正确渲染,如果可以的话希望能够修复,感谢!

@Sun-drenched
Copy link

看上去lobechat只会渲染$/$$包围的latex数学公式,虽然gpt-4o输出的那种写法也是正确的。渲染条件确实考虑得不是很全面。不是很清楚他们的渲染是怎么实现的。在更新之前,你可以用prompt的方式要求GPT,所有latex格式的数学式子都要用$/$$包围。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It seems that lobechat will only render latex mathematical formulas surrounded by $/$$, although the writing method output by gpt-4o is also correct. The rendering conditions are indeed not considered very comprehensively. It's not clear how their rendering is achieved. Before the update, you could use prompt to request GPT, and all mathematical expressions in latex format must be surrounded by $/$$.

@fomalhaut1998
Copy link
Author

感谢解答!

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Thanks for the answer!

@tisfeng
Copy link
Contributor

tisfeng commented Jun 15, 2024

来个小伙伴支持一下数学公式吧,不然看着真太别扭了 🥺

ChatGPT

image

LobeChat

image

@q351941406
Copy link

+1

1 similar comment
@koolcandy
Copy link

+1

@lobehubbot
Copy link
Member

@fomalhaut1998

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

1 similar comment
@lobehubbot
Copy link
Member

@fomalhaut1998

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@tisfeng
Copy link
Contributor

tisfeng commented Jun 24, 2024

赞 👍

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants