Skip to content

Commit 165df41

Browse files
committed
Revert "fix: pass PII mapping config to auto-detecting Candle BERT classifier"
This reverts commit e507895.
1 parent 80db7c4 commit 165df41

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/semantic-router/pkg/classification/classifier.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package classification
22

33
import (
44
"fmt"
5-
"os"
65
"slices"
76
"strings"
87
"time"
@@ -183,12 +182,7 @@ type PIIInferenceImpl struct{}
183182

184183
func (c *PIIInferenceImpl) ClassifyTokens(text string, configPath string) (candle_binding.TokenClassificationResult, error) {
185184
// Auto-detecting inference - uses whichever classifier was initialized (LoRA or Traditional)
186-
// Load the PII mapping configuration to pass to the classifier
187-
id2labelJSON, err := os.ReadFile(configPath)
188-
if err != nil {
189-
return candle_binding.TokenClassificationResult{}, fmt.Errorf("failed to read PII mapping config %s: %w", configPath, err)
190-
}
191-
return candle_binding.ClassifyCandleBertTokensWithLabels(text, string(id2labelJSON))
185+
return candle_binding.ClassifyCandleBertTokens(text)
192186
}
193187

194188
// createPIIInference creates the PII inference (auto-detecting)

0 commit comments

Comments
 (0)