From 50183392268dc61887462394b0b42fc953c05ac0 Mon Sep 17 00:00:00 2001 From: suncloudsmoon Date: Sun, 8 Sep 2024 21:51:21 -0700 Subject: [PATCH] Minor fixes --- RAGControl.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/RAGControl.cs b/RAGControl.cs index 8d28c6b..eae6e5d 100644 --- a/RAGControl.cs +++ b/RAGControl.cs @@ -8,13 +8,10 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -using Microsoft.Office.Interop.Word; using OpenAI.Chat; using UglyToad.PdfPig; using UglyToad.PdfPig.Content; using UglyToad.PdfPig.DocumentLayoutAnalysis.PageSegmenter; -using UglyToad.PdfPig.Exceptions; -using static System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar; using Task = System.Threading.Tasks.Task; using Word = Microsoft.Office.Interop.Word; @@ -22,16 +19,17 @@ namespace TextForge { public partial class RAGControl : UserControl { + // Public public HyperVectorDB.HyperVectorDB DB { get { return _db; } } public bool IsIndexing { get { return _isIndexing; } } + public static readonly int CHUNK_LEN = TokensToCharCount(256); - private BindingList _fileList; + // Private private Queue _removalQueue = new Queue(); + private ConcurrentDictionary _indexFileCount = new ConcurrentDictionary(); + private BindingList _fileList; private HyperVectorDB.HyperVectorDB _db; private bool _isIndexing; - private ConcurrentDictionary _indexFileCount = new ConcurrentDictionary(); - - public static readonly int CHUNK_LEN = TokensToCharCount(256); private readonly object progressBarLock = new object(); private static readonly Dictionary modelsContextLength = new Dictionary()