Dataset API has breaking changes but not reflected in changelog #1030

Closed
opened 2026-02-21 17:29:35 -05:00 by yindo · 2 comments
Owner

Originally created by @ipv4sq on GitHub (Feb 4, 2024).

Originally assigned to: @takatost, @zxhlyh, @JohnJyong on GitHub.

Self Checks

Provide a description of requested docs changes

  1. This is quite frustrating because the dataset api has changed dramatically without any notice in change log. Updating to 0.5.3 from 0.5.2
  2. The API url mismatched, on the title it's saying /datasets/{dataset_id}/segments/{segment_id} but in the curl command it's datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' , and the curl command is right
image
Originally created by @ipv4sq on GitHub (Feb 4, 2024). Originally assigned to: @takatost, @zxhlyh, @JohnJyong on GitHub. ### Self Checks - [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 file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Provide a description of requested docs changes 1. This is quite frustrating because the dataset api has changed dramatically without any notice in change log. Updating to 0.5.3 from 0.5.2 2. The API url mismatched, on the title it's saying `/datasets/{dataset_id}/segments/{segment_id}` but in the curl command it's `datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' `, and the curl command is right <img width="1225" alt="image" src="https://github.com/langgenius/dify/assets/146745120/1d35d997-6ab5-4c3c-9ba9-9717fe27ee19">
yindo added the 🐞 bug📚 documentation labels 2026-02-21 17:29:35 -05:00
yindo closed this issue 2026-02-21 17:29:35 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 4, 2024):

🤖

I apologize for the confusion and inconvenience caused by the changes in the dataset API and the mismatch in the documentation. I appreciate your patience and your effort in bringing this to our attention.

Regarding the changes in the dataset API from version 0.5.2 to 0.5.3, two new columns were added to the 'datasets' table: 'embedding_model' and 'embedding_model_provider'. The 'embedding_model' column has a default value of 'text-embedding-ada-002', and the 'embedding_model_provider' column has a default value of 'openai'. Both columns are not nullable. You can find the relevant code in the migration file in the repository.

As for the API URL, you are correct. The correct API URL for accessing segments in a dataset should be /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}. The title in the documentation is incorrect and should be updated to match the curl command. The correct API URLs are defined in the segment.py file in the repository.

I'm sorry, but I'm unable to view the image you've attached. As a text-based AI, I don't have the ability to process images. However, based on your description, I understand the issue and agree that the documentation needs to be updated to reflect these changes.

Thank you for your understanding and for helping us improve the dify project. Your feedback is invaluable to us.

Sources


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] commented on GitHub (Feb 4, 2024): _🤖_ <!-- Answer --> I apologize for the confusion and inconvenience caused by the changes in the dataset API and the mismatch in the documentation. I appreciate your patience and your effort in bringing this to our attention. Regarding the changes in the dataset API from version 0.5.2 to 0.5.3, two new columns were added to the 'datasets' table: 'embedding_model' and 'embedding_model_provider'. The 'embedding_model' column has a default value of 'text-embedding-ada-002', and the 'embedding_model_provider' column has a default value of 'openai'. Both columns are not nullable. You can find the relevant code in the [migration file](https://github.com/langgenius/dify/blob/main/api/migrations/versions/e8883b0148c9_add_dataset_model_name.py) in the repository. As for the API URL, you are correct. The correct API URL for accessing segments in a dataset should be `/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}`. The title in the documentation is incorrect and should be updated to match the curl command. The correct API URLs are defined in the [segment.py](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/dataset/segment.py) file in the repository. I'm sorry, but I'm unable to view the image you've attached. As a text-based AI, I don't have the ability to process images. However, based on your description, I understand the issue and agree that the documentation needs to be updated to reflect these changes. Thank you for your understanding and for helping us improve the dify project. Your feedback is invaluable to us. ## Sources - [api/migrations/versions/e8883b0148c9_add_dataset_model_name.py](https://github.com/langgenius/dify/blob/main/api/migrations/versions/e8883b0148c9_add_dataset_model_name.py) - [api/controllers/service_api/dataset/segment.py](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/dataset/segment.py) --- 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.
Author
Owner

@zxhlyh commented on GitHub (Feb 5, 2024):

fixed. #2389

@zxhlyh commented on GitHub (Feb 5, 2024): fixed. #2389
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1030