mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-05 19:11:36 +00:00
Added whole documents to the Translation, Grammar & Spelling, and Rewrite & Improve assistants (#1179)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f7666861f1
commit
918572c158
150 files changed
+12850
-302
No files matched your search
@@ -0,0 +1,35 @@
|
||||
using AIStudio.Tools;
|
||||
|
||||
namespace AIStudio.Tests.Tools;
|
||||
|
||||
/// <summary>
|
||||
/// Checks how the prompts of the language assistants name the language the user chose.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The Grammar & Spelling Checker, the Rewrite & Improve Text assistant, and the Translation assistant name the
|
||||
/// language the same way, for a text as well as for a document. The name of a common language comes in the
|
||||
/// language of the user interface, so its code follows it, and no choice leaves the prompt to name the language
|
||||
/// of the text.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public sealed class CommonLanguagePromptTests
|
||||
{
|
||||
[Test]
|
||||
public void NoChoiceNamesNoLanguage() => Assert.That(CommonLanguages.AS_IS.PromptLanguageName("Klingon"), Is.Null);
|
||||
|
||||
[Test]
|
||||
public void ACustomLanguageIsNamedAsTheUserWroteIt() => Assert.That(CommonLanguages.OTHER.PromptLanguageName("Plattdüütsch"), Is.EqualTo("Plattdüütsch"));
|
||||
|
||||
[TestCase("")]
|
||||
[TestCase(" ")]
|
||||
public void AnEmptyCustomLanguageNamesNoLanguage(string customLanguage) => Assert.That(CommonLanguages.OTHER.PromptLanguageName(customLanguage), Is.Null);
|
||||
|
||||
[Test]
|
||||
public void ACommonLanguageCarriesItsCode()
|
||||
{
|
||||
var name = CommonLanguages.DE_AT.PromptLanguageName(string.Empty);
|
||||
|
||||
Assert.That(name, Does.StartWith(CommonLanguages.DE_AT.Name));
|
||||
Assert.That(name, Does.EndWith("(DE_AT)"), "The name follows the language of the user interface, so the code tells the model which language is meant.");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user