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

[Bug] 不支持数学公式 #2911

Closed
jaychoubaby opened this issue Jun 18, 2024 · 13 comments · Fixed by lobehub/lobe-ui#168
Closed

[Bug] 不支持数学公式 #2911

jaychoubaby opened this issue Jun 18, 2024 · 13 comments · Fixed by lobehub/lobe-ui#168
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@jaychoubaby
Copy link

📦 部署环境

Docker

📌 软件版本

1.0.6

💻 系统环境

Ubuntu

🌐 浏览器

Chrome

🐛 问题描述

1
2
图一是本项目的数学公式展示,图2是某next项目的数学公式显示,希望优化

📷 复现步骤

问一个数学题相关的问题,返回的数学公式支持不友好

🚦 期望结果

能够正确显示数学公式

📝 补充信息

No response

@jaychoubaby jaychoubaby added the 🐛 Bug Something isn't working | 缺陷 label Jun 18, 2024
@lobehubbot
Copy link
Member

👀 @jaychoubaby

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

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


📦 Deployment environment

Docker

📌 Software version

1.0.6

💻 System environment

Ubuntu

🌐 Browser

Chrome

🐛 Problem description

1
2
Figure 1 shows the mathematical formula of this project. Figure 2 shows the mathematical formula of a next project. We hope to optimize it.

📷 Steps to reproduce

Ask a question related to a math problem, and the mathematical formula returned is not user-friendly.

🚦 Expected results

Ability to display mathematical formulas correctly

📝 Supplementary information

No response

@BrandonStudio
Copy link
Contributor

请点击编辑,检查模型响应中,公式两侧是否有“$”符号

@lobehubbot
Copy link
Member

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


Please click Edit and check whether there are "$" symbols on both sides of the formula in the model response.

@jaychoubaby
Copy link
Author

请点击编辑,检查模型响应中,公式两侧是否有“$”符号

`设长方形的宽为 ( x ) cm,长为 ( \frac{5}{3}x ) cm。

当宽增加变成正方形后,正方形的边长为 ( \frac{5}{3}x ) cm。

原长方形的面积为:
[ \text{原面积} = x \times \frac{5}{3}x = \frac{5}{3}x^2 ]

正方形的面积为:
[ \text{正方形面积} = \left( \frac{5}{3}x \right)^2 = \frac{25}{9}x^2 ]

根据题意,正方形的面积比原长方形的面积多30平方厘米:
[ \frac{25}{9}x^2 - \frac{5}{3}x^2 = 30 ]

将 (\frac{5}{3}x^2) 转换成分母为9的形式:
[ \frac{25}{9}x^2 - \frac{15}{9}x^2 = 30 ]
[ \frac{10}{9}x^2 = 30 ]

两边同时乘以9:
[ 10x^2 = 270 ]

两边同时除以10:
[ x^2 = 27 ]

取正的平方根:
[ x = \sqrt{27} = 3\sqrt{3} ]

所以,长方形的宽为 ( x = 3\sqrt{3} ) cm,长为 ( \frac{5}{3}x = 5\sqrt{3} ) cm。

总结:
长方形的宽为 ( 3\sqrt{3} ) cm,长为 ( 5\sqrt{3} ) cm。`

点编辑数据如下

@lobehubbot
Copy link
Member

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


Please click Edit and check whether there are "$" symbols on both sides of the formula in the model response.

`Suppose the width of the rectangle is ( x ) cm and the length is ( \frac{5}{3}x ) cm.

When the width increases and becomes a square, the side length of the square is ( \frac{5}{3}x ) cm.

The area of ​​the original rectangle is:
[ \text{Original area} = x \times \frac{5}{3}x = \frac{5}{3}x^2 ]

The area of ​​the square is:
[ \text{Area of ​​the square} = \left( \frac{5}{3}x \right)^2 = \frac{25}{9}x^2 ]

According to the meaning of the question, the area of ​​the square is 30 square centimeters more than the area of ​​the original rectangle:
[ \frac{25}{9}x^2 - \frac{5}{3}x^2 = 30 ]

Convert (\frac{5}{3}x^2) to a form with a denominator of 9:
[ \frac{25}{9}x^2 - \frac{15}{9}x^2 = 30 ]
[ \frac{10}{9}x^2 = 30 ]

Multiply both sides by 9:
[ 10x^2 = 270 ]

Divide both sides by 10:
[ x^2 = 27 ]

Take the positive square root:
[ x = \sqrt{27} = 3\sqrt{3} ]

Therefore, the width of the rectangle is ( x = 3\sqrt{3} ) cm and the length is ( \frac{5}{3}x = 5\sqrt{3} ) cm.

Summarize:
The width of the rectangle is ( 3\sqrt{3} ) cm and the length is ( 5\sqrt{3} ) cm. `

Click to edit the data as follows

@jaychoubaby
Copy link
Author

请点击编辑,检查模型响应中,公式两侧是否有“$”符号

某next点编辑数据如下,看起来是一样的,只是展示效果不一致

`这是一个代数问题,我们可以通过设置方程来求解。

设原来的长方形的宽为 (3x),长为 (5x),那么它的面积就是 (15x^2)。

当宽增加变成正方形后,长和宽都变为 (5x),新的面积就是 (25x^2)。

题目告诉我们面积增加了30平方厘米,所以我们可以建立一个方程:

[25x^2 - 15x^2 = 30]

简化这个方程,我们得到:

[10x^2 = 30]

解这个方程,我们得到:

[x^2 = 3]

所以 (x = \sqrt{3})。

那么,长方形的宽就是 (3x = 3\sqrt{3}) 厘米,长就是 (5x = 5\sqrt{3}) 厘米。`

@lobehubbot
Copy link
Member

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


Please click Edit and check whether there are "$" symbols on both sides of the formula in the model response.

The editing data at a certain next point is as follows. It looks the same, but the display effect is inconsistent.

`This is an algebraic problem that we can solve by setting up equations.

Assume that the width of the original rectangle is (3x) and the length is (5x), then its area is (15x^2).

When the width increases and becomes a square, both the length and width become (5x), and the new area is (25x^2).

The question tells us that the area has increased by 30 square centimeters, so we can establish an equation:

[25x^2 - 15x^2 = 30]

Simplifying this equation we get:

[10x^2 = 30]

Solving this equation, we get:

[x^2 = 3]

So (x = \sqrt{3}).

Then, the width of the rectangle is (3x = 3\sqrt{3}) cm, and the length is (5x = 5\sqrt{3}) cm. `

@hlc1209
Copy link

hlc1209 commented Jun 23, 2024

同遇到该问题。
gpt-4o输出公式不使用$$

@lobehubbot
Copy link
Member

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


Encountered the same problem.
gpt-4o output formula does not use $$

@jaychoubaby
Copy link
Author

image
No language model supports mathematical formulas.

@lobehubbot
Copy link
Member

@jaychoubaby

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

1 similar comment
@lobehubbot
Copy link
Member

@jaychoubaby

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

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.

4 participants