[Bug] 矩阵显示错误
Describe the bug gpr4-1106-preview latex语法显示出错
gpt回复内容: 一个三阶酉矩阵的例子可以是以下矩阵:
[ U = \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix} ]
为了验证这个矩阵确实是酉的,我们需要检查它是否满足 ( U^{\dagger}U = UU^{\dagger} = I ),其中 ( I ) 是三阶单位矩阵。
首先,计算 ( U^{\dagger} )(U 的共轭转置):
[ U^{\dagger} = \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix}^{\dagger} = \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix} ]
(注意:在这个特殊的例子中,矩阵 U 的元素都是实数,所以共轭转置只涉及转置。)
接下来,计算 ( U^{\dagger}U ) 和 ( UU^{\dagger} ):
[ U^{\dagger}U = \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix} = I ]
[ UU^{\dagger} = \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \ 0 & 1 & 0 \ \frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}} \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix} = I ]
由于 ( U^{\dagger}U ) 和 ( UU^{\dagger} ) 都等于单位矩阵 I,我们可以确认这个矩阵 U 是酉的。
To Reproduce Steps to reproduce the behavior:
- 提问gpt4 turbo
- 给我一个三阶酉矩阵的例子
- 矩阵latex显示出错
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Deployment
- [ ] Docker
- [x] Vercel
- [ ] Server
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional Logs Add any logs about the problem here.
Bot detected the issue body's language is not English, translate it automatically.
Title: [Bug] Matrix display error
it's model issue related https://github.com/Yidadaa/ChatGPT-Next-Web/discussions/3351
it's model issue related #3351
i use gpt4-1106-preview
OpenAI 为了避免 LaTex 的公式符号与美元 $ 符号冲突,使用 [] 作为公式语法,所以会出现这种情况,虽然现在可以通过调整 prompts 来解决,但未来需要提交代码,来彻底解决这个问题。
#3239
Bot detected the issue body's language is not English, translate it automatically.
In order to avoid conflicts between LaTex formulas and the dollar sign, OpenAI uses [] as the formula syntax, so this situation occurs. Although it can be solved by adjusting prompts now, code needs to be submitted in the future to completely solve this problem.
#3239