Files
HomeAgent/internal/memory/clean_text.go
JianFeeeee 31664a7853 feat: NoMemory/Cleaner memory system + doc update
- _sdk_local/ removed (moved to standalone sdk repo)
- internal/agent/core: NoMemory/Cleaner data-flow breakpoints
- internal/memory: clean_text, document store refactor
- internal/plugin/registry.go: plugin API alignment
- docs: PLUGIN_DEV.md, ARCHITECTURE.md NoMemory/Cleaner docs
- plan.md, review.md: status update
2026-07-25 11:17:31 +08:00

25 lines
438 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package memory
import (
"strings"
"gitcode.com/JianFeeeee/HomeAgent/internal/memory/vector"
)
func CleanText(text string) string {
text = strings.TrimSpace(text)
if text == "" {
return ""
}
text = strings.TrimPrefix(text, "")
text = strings.TrimPrefix(text, "")
text = strings.TrimSpace(text)
return text
}
func (e *StaticEmbedder) VectorizeClean(text string) vector.Vector {
return e.Vectorize(CleanText(text))
}