|
8 | 8 | using System.Text; |
9 | 9 | using System.Threading.Tasks; |
10 | 10 | using System.Windows.Forms; |
11 | | -using Microsoft.Office.Interop.Word; |
12 | 11 | using OpenAI.Chat; |
13 | 12 | using UglyToad.PdfPig; |
14 | 13 | using UglyToad.PdfPig.Content; |
15 | 14 | using UglyToad.PdfPig.DocumentLayoutAnalysis.PageSegmenter; |
16 | | -using UglyToad.PdfPig.Exceptions; |
17 | | -using static System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar; |
18 | 15 | using Task = System.Threading.Tasks.Task; |
19 | 16 | using Word = Microsoft.Office.Interop.Word; |
20 | 17 |
|
21 | 18 | namespace TextForge |
22 | 19 | { |
23 | 20 | public partial class RAGControl : UserControl |
24 | 21 | { |
| 22 | + // Public |
25 | 23 | public HyperVectorDB.HyperVectorDB DB { get { return _db; } } |
26 | 24 | public bool IsIndexing { get { return _isIndexing; } } |
| 25 | + public static readonly int CHUNK_LEN = TokensToCharCount(256); |
27 | 26 |
|
28 | | - private BindingList<string> _fileList; |
| 27 | + // Private |
29 | 28 | private Queue<string> _removalQueue = new Queue<string>(); |
| 29 | + private ConcurrentDictionary<int, int> _indexFileCount = new ConcurrentDictionary<int, int>(); |
| 30 | + private BindingList<string> _fileList; |
30 | 31 | private HyperVectorDB.HyperVectorDB _db; |
31 | 32 | private bool _isIndexing; |
32 | | - private ConcurrentDictionary<int, int> _indexFileCount = new ConcurrentDictionary<int, int>(); |
33 | | - |
34 | | - public static readonly int CHUNK_LEN = TokensToCharCount(256); |
35 | 33 | private readonly object progressBarLock = new object(); |
36 | 34 |
|
37 | 35 | private static readonly Dictionary<string, int> modelsContextLength = new Dictionary<string, int>() |
|
0 commit comments