-
Notifications
You must be signed in to change notification settings - Fork 173
Description
[Description]
In the Knowledge Base Settings page, the Chunking Mode configuration’s Advanced Mode does not work as expected.
After saving, the page fails to display the saved configuration correctly.
[Steps to Reproduce]
- Go to Knowledge Base → Settings
- Set Chunking Mode to Advanced
- Fill in the configuration parameters and save
- Refresh the page
- Observe that the advanced configuration is not displayed correctly
[Root Cause]
Frontend field structure does not match the backend service's data format:
Frontend sent json:
{
"mode": "advanced",
"rules": {
"text/plain": {
"splitter": "SentenceSplitter",
"splitter_config": {
"chunk_size": 1024,
"chunk_overlap": 200,
"paragraph_separator": "\n\n"
}
},
"text/markdown": {
"splitter": "MarkdownSplitter",
"splitter_config": {
"chunk_size": 1200,
"chunk_header_level": 2
}
}
}
}
Backend expected:
{
"mode": "advanced",
"rules": {
"text/plain": {
"splitter": "SentenceSplitter",
"splitter_options": {
"chunk_overlap": 200,
"chunk_size": 1024,
"paragraph_separator": "\n\n"
}
}
},
"text/markdown": {
"splitter": "MarkdownNodeParser",
"splitter_options": {
"chunk_header_level": 2,
"chunk_size": 1200
}
}
}