mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 17:27:21 +00:00
Added a way to read what the AI received from your sources (#1100)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
e0d8e18f34
commit
cbc4ce5413
229 files changed
+12739
-1269
No files matched your search
@@ -41,6 +41,23 @@ public sealed class IndexedDocumentIdsTests
|
||||
Assert.That(IndexedDocumentIds.CreateChunkId(DATA_SOURCE_ID, source, 0), Is.EqualTo("7c9d2822-f9d1-a94e-8d83-30cea4f0856f"), "Files and mails which never moved must keep the ids they are stored under.");
|
||||
}
|
||||
|
||||
/// <remarks>
|
||||
/// A document indexed again gets new chunk ids even when its fingerprint stays, as a mail's does,
|
||||
/// so the new chunks never overwrite the old ones while those are still needed.
|
||||
/// </remarks>
|
||||
[Test]
|
||||
public void TheChunkIdOfALaterGenerationIsPinned()
|
||||
{
|
||||
const string KEY = "/tmp/test-data/report.pdf";
|
||||
var parentId = IndexedDocumentIds.CreateParentId(DATA_SOURCE_ID, KEY);
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
Assert.That(IndexedDocumentIds.CreateChunkIdSource(DATA_SOURCE_ID, KEY, parentId, "3F9A0C"), Is.EqualTo("3F9A0C"), "The first generation gives the ids documents got before generations existed.");
|
||||
Assert.That(IndexedDocumentIds.CreateChunkId(DATA_SOURCE_ID, IndexedDocumentIds.CreateChunkIdSource(DATA_SOURCE_ID, KEY, parentId, "3F9A0C", 1), 0), Is.EqualTo("10e9f029-bc45-a048-9db1-e5ac74777ddb"));
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheChunkIdOfAMovedDocumentIsPinned()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user