mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 17:38:10 +00:00
- _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
25 lines
438 B
Go
25 lines
438 B
Go
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))
|
||
}
|