ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
74.89k stars 58.96k forks source link

[Bug] 显示的内容和接口返回不一致 #4660

Open 591776998 opened 4 months ago

591776998 commented 4 months ago

Bug Description

提示词:sh脚本读取从输入的参数 页面输出结果:在Shell脚本(sh或bash)中,你可以通过特殊的变量来读取从命令行传递给脚本的参数。这些变量包括:

\$0 - 脚本的名称。 接口响应结果:在Shell脚本(sh或bash)中,你可以通过特殊的变量来读取从命令行传递给脚本的参数。这些变量包括:

$0 - 脚本的名称。 BUG:接口输出中$0前没有反斜杠\,但是页面显示成了\$0,出现一个反斜杠,导致回答的内容和实际不一致 1715396986618

Steps to Reproduce

1.输入提示词:sh脚本读取从输入的参数 2.等待结果输出完毕 3.输出结果中提到获取\$0

Expected Behavior

输出结果应该和接口返回一致,是$0

Screenshots

1715396986618

Deployment Method

Desktop OS

windows11

Desktop Browser

chrome

Desktop Browser Version

124.0.6367.201

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"第"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"一个"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"参数"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"是"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":":"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"$"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"1"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"\"\n\n"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

data: {"choices":[{"content_filter_result":{"error":{"code":"content_filter_error","message":"The contents are not filtered"}},"delta":{"content":"#"},"finish_reason":null,"index":0}],"created":1715396484,"id":"chatcmpl-9NXHAf8BEvn3ze71CWEjIMAOZjHeq","model":"gpt-35-turbo","object":"chat.completion.chunk","system_fingerprint":null}

Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] The displayed content is inconsistent with the interface return

Dean-YZG commented 4 months ago

感谢反馈,这个问题是由于 nextchat中使用的三方 markdown渲染工具对 Latex 语法支持的不完善导致的,在 latex 语法中,$是一个特殊的符号,在解析的过程中,发生了混淆,进而导致了这个问题,我们正在密切关注三方 markdown渲染工具对 Latex 语法支持的进展情况。

Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically.


Thanks for the feedback. This problem is caused by the imperfect support for Latex syntax used by the three-party markdown rendering tools used in nextchat. In latex syntax, $ is a special symbol. During the parsing process, confusion occurred, and then As a result of this problem, we are paying close attention to the progress of third-party markdown rendering tools' support for Latex syntax.

xiaoxx970 commented 4 months ago

我也遇到了这样的问题, 可是这是markdown中的shell块, 为什么会用Latex 语法来渲染呢

Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically.


I also encountered such a problem, but this is a shell block in markdown. Why is it rendered using Latex syntax?