From cfdefcd0752ee802f338cca26628b4ef451f0bbf Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 12 Jan 2026 23:15:19 +0100 Subject: [PATCH] chore(knowledgebase): clean collection names (no spaces,no uppercase) (#385) Signed-off-by: Ettore Di Giacinto --- pkg/localrag/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/localrag/client.go b/pkg/localrag/client.go index 0e76974..f6a6672 100644 --- a/pkg/localrag/client.go +++ b/pkg/localrag/client.go @@ -13,6 +13,7 @@ import ( "net/http" "os" "path/filepath" + "strings" "time" "github.com/mudler/LocalAGI/core/agent" @@ -26,7 +27,8 @@ type WrappedClient struct { collection string } -func NewWrappedClient(baseURL, apiKey, collection string) *WrappedClient { +func NewWrappedClient(baseURL, apiKey, c string) *WrappedClient { + collection := strings.TrimSpace(strings.ToLower(c)) wc := &WrappedClient{ Client: NewClient(baseURL, apiKey), collection: collection,