i have a error #7160

Closed
opened 2026-02-21 18:19:12 -05:00 by yindo · 1 comment
Owner

Originally created by @xs818818 on GitHub (Dec 11, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.12

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

2024-12-12 11-44-29屏幕截图
Uploading 2024-12-12 11-45-50屏幕截图.png…

✔️ Expected Behavior

{
"answer": "{"type":"0","text":"您好!很高兴能为您服务。无论是饮食、运动、睡眠、心理健康还是慢性病管理等方面的问题,我都可以为您提供科学、健康的建议。请您告诉我您想了解的具体内容吧。"}"
}

Actual Behavior

{"page":1,"pic_url":"[http://8.152.1.80:9000/healthfood/蓝莓.jpg","name":"蓝莓"}]{"type":"0","text":"您好!很高兴能为您服务。无论是饮食、运动、睡眠、心理健康还是慢性病管理等方面的问题,我都可以为您提供科学、健康的建议。请您告诉我您想了解的具体内容吧。"}

Originally created by @xs818818 on GitHub (Dec 11, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.12 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![2024-12-12 11-44-29屏幕截图](https://github.com/user-attachments/assets/24a5dd56-dd0d-4604-9cd5-610f8746ddfa) ![Uploading 2024-12-12 11-45-50屏幕截图.png…]() ### ✔️ Expected Behavior { "answer": "{\"type\":\"0\",\"text\":\"您好!很高兴能为您服务。无论是饮食、运动、睡眠、心理健康还是慢性病管理等方面的问题,我都可以为您提供科学、健康的建议。请您告诉我您想了解的具体内容吧。\"}" } ### ❌ Actual Behavior [{"page":1,"pic_url":"[http://8.152.1.80:9000/healthfood/蓝莓.jpg","name":"蓝莓"}]{"type":"0","text":"您好!很高兴能为您服务。无论是饮食、运动、睡眠、心理健康还是慢性病管理等方面的问题,我都可以为您提供科学、健康的建议。请您告诉我您想了解的具体内容吧。](http://8.152.1.80:9000/healthfood/%E8%93%9D%E8%8E%93.jpg%22,%22name%22:%22%E8%93%9D%E8%8E%93%22%7D%5D%7B%22type%22:%220%22,%22text%22:%22%E6%82%A8%E5%A5%BD%EF%BC%81%E5%BE%88%E9%AB%98%E5%85%B4%E8%83%BD%E4%B8%BA%E6%82%A8%E6%9C%8D%E5%8A%A1%E3%80%82%E6%97%A0%E8%AE%BA%E6%98%AF%E9%A5%AE%E9%A3%9F%E3%80%81%E8%BF%90%E5%8A%A8%E3%80%81%E7%9D%A1%E7%9C%A0%E3%80%81%E5%BF%83%E7%90%86%E5%81%A5%E5%BA%B7%E8%BF%98%E6%98%AF%E6%85%A2%E6%80%A7%E7%97%85%E7%AE%A1%E7%90%86%E7%AD%89%E6%96%B9%E9%9D%A2%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%8C%E6%88%91%E9%83%BD%E5%8F%AF%E4%BB%A5%E4%B8%BA%E6%82%A8%E6%8F%90%E4%BE%9B%E7%A7%91%E5%AD%A6%E3%80%81%E5%81%A5%E5%BA%B7%E7%9A%84%E5%BB%BA%E8%AE%AE%E3%80%82%E8%AF%B7%E6%82%A8%E5%91%8A%E8%AF%89%E6%88%91%E6%82%A8%E6%83%B3%E4%BA%86%E8%A7%A3%E7%9A%84%E5%85%B7%E4%BD%93%E5%86%85%E5%AE%B9%E5%90%A7%E3%80%82)"}
yindo closed this issue 2026-02-21 18:19:12 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 11, 2024):

I found a similar closed issue related to JSON formatting errors in Dify. The issue was about a SyntaxError: Unterminated string in JSON [1]. However, no solution was found in the comments of that issue.

In your case, the actual behavior shows a JSON formatting issue where two JSON objects seem to be concatenated without a proper separator. The expected JSON format should be a single valid JSON object or array. You might need to ensure that the JSON response is correctly formatted as a single JSON object or array, and that any concatenated JSON objects are properly separated or nested within an array.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 11, 2024): <!-- Answer --> I found a similar closed issue related to JSON formatting errors in Dify. The issue was about a `SyntaxError: Unterminated string in JSON` <sup>[[1]](https://github.com/langgenius/dify/issues/290)</sup>. However, no solution was found in the comments of that issue. In your case, the actual behavior shows a JSON formatting issue where two JSON objects seem to be concatenated without a proper separator. The expected JSON format should be a single valid JSON object or array. You might need to ensure that the JSON response is correctly formatted as a single JSON object or array, and that any concatenated JSON objects are properly separated or nested within an array. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/fb7e11e6-d96f-4a30-af2e-11d1c3aca4e2?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/fb7e11e6-d96f-4a30-af2e-11d1c3aca4e2?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/fb7e11e6-d96f-4a30-af2e-11d1c3aca4e2?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/fb7e11e6-d96f-4a30-af2e-11d1c3aca4e2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fb7e11e6-d96f-4a30-af2e-11d1c3aca4e2?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/fb7e11e6-d96f-4a30-af2e-11d1c3aca4e2?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7160