mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-30 20:49:21 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user