Skip to content

Commit

Permalink
fix(text): migrate all text chunk field
Browse files Browse the repository at this point in the history
  • Loading branch information
chuang8511 committed Aug 21, 2024
1 parent 033c8ea commit 2cef8ea
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/db/migration/convert/convert000023/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ func (c *TextFieldsConverter) convertField(comp *datamodel.Component) (bool, err
return false, nil
}

Check warning on line 148 in pkg/db/migration/convert/convert000023/convert.go

View check run for this annotation

Codecov / codecov/patch

pkg/db/migration/convert/convert000023/convert.go#L144-L148

Added lines #L144 - L148 were not covered by tests

chunkMethod, ok := settingMap["chunk-method"].(string)
if !ok {
log.Println("Missing field chunk-method on TASK_CHUNK_TEXT")
return false, nil
Expand All @@ -160,10 +159,6 @@ func (c *TextFieldsConverter) convertField(comp *datamodel.Component) (bool, err
return false, nil
}

Check warning on line 160 in pkg/db/migration/convert/convert000023/convert.go

View check run for this annotation

Codecov / codecov/patch

pkg/db/migration/convert/convert000023/convert.go#L155-L160

Added lines #L155 - L160 were not covered by tests

if !(chunkMethod == "Recursive" || chunkMethod == "Markdown") {
return false, nil
}

tokenization := map[string]interface{}{
"choice": map[string]interface{}{
"model": modelName,
Expand Down

0 comments on commit 2cef8ea

Please sign in to comment.