dify icon indicating copy to clipboard operation
dify copied to clipboard

create an empty knowledge and empty files, vector collection not created.

Open liuzhenghua opened this issue 10 months ago • 3 comments

Self Checks

  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.5.10

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

bugs occured after the following steps:

  1. create an empty knowledge.
  2. add an empty file in web page or using create_by_text API, the text remains empty
{
    "name": "demo.txt",
    "text": "",
    "indexing_technique": "high_quality",
    "process_rule": {
        "mode": "automatic"
    }
}
  1. add chunk in web page or using add segments api

✔️ Expected Behavior

the segment should be enabled. image

❌ Actual Behavior

cause of the collection was not created when you upload an empty file, the chunk you created can't be successs. image

liuzhenghua avatar Mar 29 '24 06:03 liuzhenghua

Hello @liuzhenghua,

I'm Dosu, a bot here to assist you with solving bugs, answering questions, and guiding you on how to contribute while you're waiting for a human maintainer. If you have any questions or need further assistance, I'm here to help. I'm currently reviewing your issue and will provide a comprehensive answer shortly.

dosubot[bot] avatar Mar 29 '24 06:03 dosubot[bot]

由于创建空文件时,没有创建collection,下次往这个文档新建chunk的时候,无法往向量库写入数据,导致报错: "Error during query: [{'locations': [{'column': 6, 'line': 1}], 'message': 'Cannot query field "Vector_index_3b5a7bd1_2cfb_4ae2_a89c_019472e90033_Node" on type "GetObjectsObj". Did you mean "Vector_index_6038789c_2c73_4190_809c_c170be45bb47_Node"?', 'path': None}]"

liuzhenghua avatar Mar 29 '24 06:03 liuzhenghua

The issue you're encountering seems to be due to a mismatch or an incorrect query structure that does not align with the expected schema in Dify's database. The error message suggests that there's a discrepancy between the document ID and the vector index name used in your query compared to those configured in your Dify setup. Here are some steps to address this issue:

  1. Verify Document ID and Vector Index Name: Ensure that the document ID and the vector index name in your query match those in your Dify setup. Any mismatch can lead to the errors you're experiencing.

  2. Check Dify Version Compatibility: Confirm that the version of Dify you're using (0.5.10) supports the operations you're attempting. It might be beneficial to consult the Dify documentation or reach out to support for any known issues or updates related to vector library interactions.

  3. Update Dify: Look for any updates or patches for Dify that might address this issue. Keeping your software up to date ensures you have the latest features and bug fixes.

It appears there's a lack of specific information regarding how Dify handles the creation of collections when an empty file is uploaded, as well as the expected behavior in such scenarios. If you could provide more details about your Dify setup or the steps leading up to the issue, it would help in offering a more precise solution. Additionally, sharing any error logs or messages beyond the initial query error could be beneficial.

For further guidance, you might want to refer to the Dify documentation.

Sources

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.

If you want to continue the conversation, start your reply with @dosu-bot.

dosubot[bot] avatar Mar 29 '24 06:03 dosubot[bot]

it has fix by below pr : https://github.com/langgenius/dify/pull/3021 , thanks for your feedback @liuzhenghua

JohnJyong avatar Apr 02 '24 12:04 JohnJyong