chore(knowledgebase): clean collection names (no spaces,no uppercase) (#385)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
ec3f302cdf
commit
cfdefcd075
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user