langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
47.42k stars 6.76k forks source link

在构建workflow后使用run batch功能,对下载的template添加数据后,再使用WPS保存上传,点击EXECUTE执行后报错:The uploaded CSV file not match the struct #3826

Closed yang605222 closed 5 months ago

yang605222 commented 5 months ago

Self Checks

Dify version

0.10.3

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

在构建workflow后使用run batch功能,对下载的template添加数据后,再使用WPS保存上传,点击EXECUTE执行后报错:The uploaded CSV file not match the struct

✔️ Expected Behavior

期望上传经过WPS保存的csv文件可以顺利执行构建的agent

❌ Actual Behavior

报错:The uploaded CSV file not match the struct

dosubot[bot] commented 5 months ago

The error "The uploaded CSV file not match the struct" indicates that the structure of the CSV file uploaded after using WPS to save and upload does not match the expected structure defined by the application. To resolve this, ensure your CSV file adheres to the expected structure based on the document form type you're working with:

  1. For QA Forms: The CSV should have two columns, one for questions and one for answers, with headers "question" and "answer" (or their equivalents in other languages) in the first row.
  2. For Text Forms: The CSV should have a single column for paragraph content, with the header "segment content" (or its equivalent) in the first row.

Make sure to download and use the correct template provided by the application for your document form type. This template is dynamically generated to match the structure required for either QA or Text forms and is based on the user's language setting.

Avoid common mistakes such as leaving the file empty, mismatching the structure with the selected document form, leaving any rows empty, missing values in required fields, exceeding the maximum length for any value, and not including at least one row of data in the file.

By following these guidelines and using the provided template, you should be able to upload your CSV file successfully to the application.

#### Details **Sources** - [web/i18n/en-US/share-app.ts](https://github.com/langgenius/dify/blob/main/web/i18n/en-US/share-app.ts) - [web/app/components/datasets/documents/detail/batch-modal/csv-downloader.tsx](https://github.com/langgenius/dify/blob/main/web/app/components/datasets/documents/detail/batch-modal/csv-downloader.tsx) - [sdks/php-client/dify-client.php](https://github.com/langgenius/dify/blob/main/sdks/php-client/dify-client.php)
**About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.