400 for saving text to knowledge base, just for extra '\' before exisiting '\', '\\' cause 400 #3696

Closed
opened 2026-02-21 18:00:54 -05:00 by yindo · 0 comments
Owner

Originally created by @hanwsf on GitHub (May 26, 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).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.68

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

{
"request": "POST http://docker-nginx-1/v1/datasets/3ssss/document/create_by_text HTTP/1.1\nContent-Type: application/json\nAuthorization: ***************************************\n\n{\n "name": "java如何进行AIGC应用开发与python开发有什么不同?",\n\n\n "text": "Java和Python是两种常用的编程语言,一些人工智能应用程序可能需要使用这两种语言来开发。虽然AIGC(人工智能和全球社区)可以在Java中工作,但它通常更适用于Python,因为Python的简单性和易于学习的语法使其非常适合AI开发。\n\nJava如何进行AIGC应用开发:\n1. 首先,确保你已经安装了Java Development Kit(JDK)并配置了环境变量。\n2. 接下来,你需要选择一个合适的Java库或框架来处理AI任务。例如,您可以使用DeepLearning4J进行深度学习,或使用Weka进行机器学习。\n3. 编写代码,按照所需的AI应用程序设计流程进行操作。",\n\n "indexing_technique": "high_quality",\n "process_rule": {\n "mode": "automatic"\n }\n}"
}
success for manual debug.
{
"request": "POST http://docker-nginx-1/v1/datasets/3sss/document/create_by_text HTTP/1.1\nContent-Type: application/json\nAuthorization: ***************************************\n\n{\n "name": "java如何进行AIGC应用开发与python开发有什么不同?",\n\n\n "text": "Java和Python是两种常用的编程语言,一些人工智能应用程序可能需要使用这两种语言来开发。虽然AIGC(人工智能和全球社区)可以在Java中工作,但它通常更适用于Python,因为Python的简单性和易于学习的语法使其非常适合AI开发。\n\nJava如何进行AIGC应用开发:\n1. 首先,确保你已经安装了Java Development Kit(JDK)并配置了环境变量。\n2. 接下来,你需要选择一个合适的Java库或框架来处理AI任务。例如,您可以使用DeepLearning4J进行深度学习,或使用Weka进行机器学习。\n3. 编写代码,按照所需的AI应用程序设计流程进行操作。",\n\n "indexing_technique": "high_quality",\n "process_rule": {\n "mode": "automatic"\n }\n}"
}
400 for workflow, because of '\n'.

✔️ Expected Behavior

200

Actual Behavior

400

Originally created by @hanwsf on GitHub (May 26, 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] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.68 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce { "request": "POST http://docker-nginx-1/v1/datasets/3ssss/document/create_by_text HTTP/1.1\nContent-Type: application/json\nAuthorization: ***************************************\n\n{\n \"name\": \"java如何进行AIGC应用开发与python开发有什么不同?\",\n\n\n \"text\": \"Java和Python是两种常用的编程语言,一些人工智能应用程序可能需要使用这两种语言来开发。虽然AIGC(人工智能和全球社区)可以在Java中工作,但它通常更适用于Python,因为Python的简单性和易于学习的语法使其非常适合AI开发。\n\nJava如何进行AIGC应用开发:\n1. 首先,确保你已经安装了Java Development Kit(JDK)并配置了环境变量。\n2. 接下来,你需要选择一个合适的Java库或框架来处理AI任务。例如,您可以使用DeepLearning4J进行深度学习,或使用Weka进行机器学习。\n3. 编写代码,按照所需的AI应用程序设计流程进行操作。\",\n\n \"indexing_technique\": \"high_quality\",\n \"process_rule\": {\n \"mode\": \"automatic\"\n }\n}" } success for manual debug. { "request": "POST http://docker-nginx-1/v1/datasets/3sss/document/create_by_text HTTP/1.1\nContent-Type: application/json\nAuthorization: ***************************************\n\n{\n \"name\": \"java如何进行AIGC应用开发与python开发有什么不同?\",\n\n\n \"text\": \"Java和Python是两种常用的编程语言,一些人工智能应用程序可能需要使用这两种语言来开发。虽然AIGC(人工智能和全球社区)可以在Java中工作,但它通常更适用于Python,因为Python的简单性和易于学习的语法使其非常适合AI开发。\\n\\nJava如何进行AIGC应用开发:\\n1. 首先,确保你已经安装了Java Development Kit(JDK)并配置了环境变量。\\n2. 接下来,你需要选择一个合适的Java库或框架来处理AI任务。例如,您可以使用DeepLearning4J进行深度学习,或使用Weka进行机器学习。\\n3. 编写代码,按照所需的AI应用程序设计流程进行操作。\",\n\n \"indexing_technique\": \"high_quality\",\n \"process_rule\": {\n \"mode\": \"automatic\"\n }\n}" } 400 for workflow, because of '\\n'. ### ✔️ Expected Behavior 200 ### ❌ Actual Behavior 400
yindo added the 🐞 bug label 2026-02-21 18:00:54 -05:00
yindo closed this issue 2026-02-21 18:00:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3696