Added a semantic search tool (#1005)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-09-27 16:26:52 +02:00
1 parent 4baf21656a
commit 1eaca9b12f
91 files changed
+4248 -487

No files matched your search

@@ -34,6 +34,7 @@ public sealed class ChatTemplateConfigurationTests
DisableDataSources = false,
AutomaticDataSourceSelection = false,
AutomaticValidation = true,
RetrievalMode = DataSourceRetrievalMode.EVERY_MESSAGE,
PreselectedDataSourceIds = ["11111111-1111-1111-1111-111111111111"],
},
};
@@ -47,6 +48,7 @@ public sealed class ChatTemplateConfigurationTests
Assert.That(read.DataSourceOptions!.DisableDataSources, Is.False);
Assert.That(read.DataSourceOptions.AutomaticDataSourceSelection, Is.False);
Assert.That(read.DataSourceOptions.AutomaticValidation, Is.True);
Assert.That(read.DataSourceOptions.RetrievalMode, Is.EqualTo(DataSourceRetrievalMode.EVERY_MESSAGE), "Semantic search is the default, so only the other choice shows that the export carries it.");
Assert.That(read.DataSourceOptions.PreselectedDataSourceIds, Is.EqualTo(written.DataSourceOptions!.PreselectedDataSourceIds));
});
}
@@ -129,10 +131,34 @@ public sealed class ChatTemplateConfigurationTests
Assert.That(read.DataSourceOptions!.DisableDataSources, Is.False, "Writing this table is already the statement that the template wants data sources, so an omitted switch must not turn them off again.");
Assert.That(read.DataSourceOptions.AutomaticDataSourceSelection, Is.False);
Assert.That(read.DataSourceOptions.AutomaticValidation, Is.False);
Assert.That(read.DataSourceOptions.RetrievalMode, Is.EqualTo(DataSourceRetrievalMode.SEMANTIC_SEARCH));
Assert.That(read.DataSourceOptions.PreselectedDataSourceIds, Is.EqualTo(new[] { "11111111-1111-1111-1111-111111111111" }));
});
}
[TestCase("'EVERY_MESSAGE'", DataSourceRetrievalMode.EVERY_MESSAGE)]
[TestCase("'every_message'", DataSourceRetrievalMode.EVERY_MESSAGE)]
[TestCase("'1'", DataSourceRetrievalMode.SEMANTIC_SEARCH)]
[TestCase("1", DataSourceRetrievalMode.SEMANTIC_SEARCH)]
[TestCase("'SEMANTIC_SEARCH, EVERY_MESSAGE'", DataSourceRetrievalMode.SEMANTIC_SEARCH)]
[TestCase("'every message'", DataSourceRetrievalMode.SEMANTIC_SEARCH)]
[TestCase("true", DataSourceRetrievalMode.SEMANTIC_SEARCH)]
public async Task OnlyTheNameOfARetrievalModeCounts(string luaValue, DataSourceRetrievalMode expectedMode)
{
var read = await ParseAsync($$"""
CONFIG["CHAT_TEMPLATES"][#CONFIG["CHAT_TEMPLATES"]+1] = {
["Id"] = "33333333-3333-3333-3333-333333333333",
["Name"] = "Intranet Research",
["SystemPrompt"] = "You are a research assistant.",
["DataSourceOptions"] = {
["RetrievalMode"] = {{luaValue}},
},
}
""");
Assert.That(read.DataSourceOptions!.RetrievalMode, Is.EqualTo(expectedMode), "Parsing alone would read a number, or several names at once, as searching with every message.");
}
[Test]
public async Task AnUnusableEntryIsSkippedAndTheRestOfTheListSurvives()
{