This commit is contained in:
Ettore Di Giacinto
2025-03-01 22:44:45 +01:00
parent 7a98408336
commit 89d7da3817

View File

@@ -15,6 +15,7 @@ import (
"path/filepath" "path/filepath"
"github.com/mudler/LocalAgent/core/agent" "github.com/mudler/LocalAgent/core/agent"
"github.com/mudler/LocalAgent/pkg/xlog"
) )
var _ agent.RAGDB = &WrappedClient{} var _ agent.RAGDB = &WrappedClient{}
@@ -62,6 +63,8 @@ func (c *WrappedClient) Store(s string) error {
hash := md5.Sum([]byte(s)) hash := md5.Sum([]byte(s))
fileName := hex.EncodeToString(hash[:]) + ".txt" fileName := hex.EncodeToString(hash[:]) + ".txt"
xlog.Debug("Storing string in LocalRAG", "collection", c.collection, "fileName", fileName)
tempdir, err := os.MkdirTemp("", "localrag") tempdir, err := os.MkdirTemp("", "localrag")
if err != nil { if err != nil {
return err return err