Support pipeline DSL modification through dataset configuration (backend) (#16991)

…end)

### Summary

Support pipeline DSL modification through dataset configuration
(backend)

Key modification: knowledgebase.parser_config

---------

Co-authored-by: yzc <yuzhichang@gmail.com>
This commit is contained in:
qinling0210
2026-07-17 14:40:09 +08:00
committed by GitHub
parent b32d5fd86b
commit 995e405e8c
52 changed files with 4093 additions and 2819 deletions

View File

@@ -126,9 +126,10 @@ func (p *CSVParser) ParseWithResult(filename string, data []byte) ParseResult {
case "", "csv":
// Continue with the local CSV parser.
default:
return ParseResult{
Err: fmt.Errorf("unsupported CSV parse method: %q", p.ParseMethod),
}
// PDF-specific methods like "DeepDOC" / "PaddleOCR" / "MinerU"
// are meaningless for CSV; treat them as the default CSV path,
// matching Python's behaviour where parse_method is irrelevant
// for CSV processing.
}
text := string(data)
@@ -147,6 +148,7 @@ func (p *CSVParser) ParseWithResult(filename string, data []byte) ParseResult {
reader := csv.NewReader(strings.NewReader(text))
reader.LazyQuotes = true
reader.TrimLeadingSpace = true
reader.FieldsPerRecord = -1 // Allow variable column counts, matching Python csv.reader behaviour.
records, err := reader.ReadAll()
if err != nil {