Enha (rag): bigger default batch
This commit is contained in:
@@ -28,8 +28,8 @@ AutoScrollEnabled = true
|
|||||||
AutoCleanToolCallsFromCtx = false
|
AutoCleanToolCallsFromCtx = false
|
||||||
# rag settings
|
# rag settings
|
||||||
RAGBatchSize = 1
|
RAGBatchSize = 1
|
||||||
RAGWordLimit = 80
|
RAGWordLimit = 250
|
||||||
RAGOverlapWords = 16
|
RAGOverlapWords = 25
|
||||||
RAGDir = "ragimport"
|
RAGDir = "ragimport"
|
||||||
# extra tts
|
# extra tts
|
||||||
TTS_ENABLED = false
|
TTS_ENABLED = false
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ func createChunks(sentences []string, wordLimit, overlapWords uint32) []string {
|
|||||||
|
|
||||||
func sanitizeFTSQuery(query string) string {
|
func sanitizeFTSQuery(query string) string {
|
||||||
// Remove double quotes and other problematic characters for FTS5
|
// Remove double quotes and other problematic characters for FTS5
|
||||||
query = strings.ReplaceAll(query, "\"", " ")
|
// query = strings.ReplaceAll(query, "\"", " ")
|
||||||
query = strings.ReplaceAll(query, "'", " ")
|
query = strings.ReplaceAll(query, "'", " ")
|
||||||
query = strings.ReplaceAll(query, ";", " ")
|
query = strings.ReplaceAll(query, ";", " ")
|
||||||
query = strings.ReplaceAll(query, "\\", " ")
|
query = strings.ReplaceAll(query, "\\", " ")
|
||||||
|
|||||||
4
tools.go
4
tools.go
@@ -360,13 +360,13 @@ func ragsearch(args map[string]string) []byte {
|
|||||||
}
|
}
|
||||||
limitS, ok := args["limit"]
|
limitS, ok := args["limit"]
|
||||||
if !ok || limitS == "" {
|
if !ok || limitS == "" {
|
||||||
limitS = "3"
|
limitS = "10"
|
||||||
}
|
}
|
||||||
limit, err := strconv.Atoi(limitS)
|
limit, err := strconv.Atoi(limitS)
|
||||||
if err != nil || limit == 0 {
|
if err != nil || limit == 0 {
|
||||||
logger.Warn("ragsearch limit; passed bad value; setting to default (3)",
|
logger.Warn("ragsearch limit; passed bad value; setting to default (3)",
|
||||||
"limit_arg", limitS, "error", err)
|
"limit_arg", limitS, "error", err)
|
||||||
limit = 3
|
limit = 10
|
||||||
}
|
}
|
||||||
ragInstance := rag.GetInstance()
|
ragInstance := rag.GetInstance()
|
||||||
if ragInstance == nil {
|
if ragInstance == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user