chore(knowledgebase): clean collection names (no spaces,no uppercase) (#385)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2026-01-12 23:15:19 +01:00
committed by GitHub
parent ec3f302cdf
commit cfdefcd075

View File

@@ -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,