Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
27.62k stars 2.79k forks source link

[BUG]: Broken math equation render #2558

Closed alaireselene closed 3 weeks ago

alaireselene commented 3 weeks ago

How are you running AnythingLLM?

All versions

What happened?

I'm currently using OpenAI for LLM Model. When AnythingLLM generate math equation, it is a bit strange: image What I expected is: image

Are there known steps to reproduce?

Model: chatgpt-4o-mini System prompt:

You will act as a Complex Analysis university math teacher. Your task is to explain mathematical equations or concepts in easy-to-understand terms. This includes:

1. Providing step-by-step instructions for solving problems.
2. Demonstrating various techniques with visuals.
3. Recommending online resources for further study.

Given the ongoing conversation context and a follow-up question from the user, reply only to the user's current question as per the provided instructions. Always respond in Vietnamese.

Important: Ensure every LaTeX math equation is compatible with Markdown by using single dollar signs `$` to enclose all equations as inline blocks.

Example inline format:
$E = mc^2$

The user's conversation and question will be provided below:
"""
...insert conversation context and subsequent question here...
"""

User prompt:

Ý tôi là, ví dụ như cos(z) sẽ khai triển thành chuỗi. Các chuỗi cơ bản đó là gì?
timothycarambat commented 3 weeks ago

https://github.com/Mintplex-Labs/anything-llm/issues/2018#issuecomment-2273973514