Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_by_text raise 500 error when create an empty dataset #12453

Closed
5 tasks done
crazywoola opened this issue Jan 7, 2025 · 0 comments · Fixed by #12495
Closed
5 tasks done

create_by_text raise 500 error when create an empty dataset #12453

crazywoola opened this issue Jan 7, 2025 · 0 comments · Fixed by #12495
Assignees
Labels
🐞 bug Something isn't working good first issue Good first issue for newcomers

Comments

@crazywoola
Copy link
Member

crazywoola commented Jan 7, 2025

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.15.0

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

Run

curl --location --request POST 'https://api.dify.ai/v1/datasets' \                                                                    minibanana@minibanana
--header 'Authorization: Bearer KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"name": "Test Knowledge Base", "permission": "only_me"}'

Result

{"id": "c89d0a9b-82b8-4dc1-834d-3e0868750702", "name": "Test Knowledge Base", "description": "", "provider": "vendor", "permission": "only_me", "data_source_type": null, "indexing_technique": null, "app_count": 0, "document_count": 0, "word_count": 0, "created_by": "b653e75a-d227-4be7-a3b7-cae6929bc755", "created_at": 1736257682, "updated_by": "b653e75a-d227-4be7-a3b7-cae6929bc755", "updated_at": 1736257682, "embedding_model": null, "embedding_model_provider": null, "embedding_available": null, "retrieval_model_dict": {"search_method": "semantic_search", "reranking_enable": false, "reranking_mode": null, "reranking_model": {"reranking_provider_name": "", "reranking_model_name": ""}, "weights": null, "top_k": 2, "score_threshold_enabled": false, "score_threshold": null}, "tags": [], "doc_form": null, "external_knowledge_info": {"external_knowledge_id": null, "external_knowledge_api_id": null, "external_knowledge_api_name": null, "external_knowledge_api_endpoint": null}, "external_retrieval_model": {"top_k": 2, "score_threshold": 0.0, "score_threshold_enabled": null}}

Run

curl --location 'https://api.dify.ai/v1/datasets/c89d0a9b-82b8-4dc1-834d-3e0868750702/document/create_by_text' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer dataset-b69cTwDWqNXpOr6vVvPBdggE' \
--data '{"name": "text","text": "text","indexing_technique": "high_quality","process_rule": {"mode": "automatic"}}'

Result

{
    "message": "Internal Server Error",
    "code": "unknown"
}

✔️ Expected Behavior

200

❌ Actual Behavior

If we choose the same indexing_technique while posting the data then everything should be fine.

--data-raw '{"name": "Test Knowledge Base", "permission": "only_me"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working good first issue Good first issue for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants