summaryrefslogtreecommitdiff
path: root/rag/main.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-02-15 11:09:47 +0300
committerGrail Finder <wohilas@gmail.com>2025-02-15 11:09:47 +0300
commitc1344794143ef48670d8eeb365a10a5295a145ae (patch)
tree375a11525bd2117235043e4c1d95c5f842c9c202 /rag/main.go
parent83babd027140b7ae41743655fa016bf3551350c2 (diff)
Enha: log level to props
Diffstat (limited to 'rag/main.go')
-rw-r--r--rag/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/rag/main.go b/rag/main.go
index d4065e5..5f2aa00 100644
--- a/rag/main.go
+++ b/rag/main.go
@@ -49,7 +49,7 @@ func (r *RAG) LoadRAG(fpath string) error {
if err != nil {
return err
}
- r.logger.Info("rag: loaded file", "fp", fpath)
+ r.logger.Debug("rag: loaded file", "fp", fpath)
LongJobStatusCh <- LoadedFileRAGStatus
fileText := string(data)
tokenizer, err := english.NewSentenceTokenizer(nil)
@@ -105,7 +105,7 @@ func (r *RAG) LoadRAG(fpath string) error {
ctn++
}
finishedBatchesMsg := fmt.Sprintf("finished batching batches#: %d; paragraphs: %d; sentences: %d\n", len(batchCh), len(paragraphs), len(sents))
- r.logger.Info(finishedBatchesMsg)
+ r.logger.Debug(finishedBatchesMsg)
LongJobStatusCh <- finishedBatchesMsg
for w := 0; w < workers; w++ {
go r.batchToVectorHFAsync(lock, w, batchCh, vectorCh, errCh, doneCh, path.Base(fpath))
@@ -127,9 +127,9 @@ func (r *RAG) writeVectors(vectorCh chan []models.VectorRow) error {
// return err
}
}
- r.logger.Info("wrote batch to db", "size", len(batch), "vector_chan_len", len(vectorCh))
+ r.logger.Debug("wrote batch to db", "size", len(batch), "vector_chan_len", len(vectorCh))
if len(vectorCh) == 0 {
- r.logger.Info("finished writing vectors")
+ r.logger.Debug("finished writing vectors")
LongJobStatusCh <- FinishedRAGStatus
defer close(vectorCh)
return nil
@@ -160,7 +160,7 @@ func (r *RAG) batchToVectorHFAsync(lock *sync.Mutex, id int, inputCh <-chan map[
lock.Unlock()
return
}
- r.logger.Info("to vector batches", "batches#", len(inputCh), "worker#", id)
+ r.logger.Debug("to vector batches", "batches#", len(inputCh), "worker#", id)
LongJobStatusCh <- fmt.Sprintf("converted to vector; batches: %d, worker#: %d", len(inputCh), id)
}
}