mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 12:58:00 +00:00
Read the context window from four more model lists
This commit is contained in:
16 files changed
+415
-28
No files matched your search
@@ -151,4 +151,29 @@ public sealed class ListedModelsTests
|
||||
{
|
||||
Assert.That(ModelListing.NOTHING.ApplyTo(WHAT_THE_RULES_SAY), Is.EqualTo(WHAT_THE_RULES_SAY));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AWindowAProviderStatedIsTakenAsItIs()
|
||||
{
|
||||
Assert.That(ModelListing.For(MODEL, 32_768).Context.DefaultTokens, Is.EqualTo(32_768));
|
||||
}
|
||||
|
||||
[TestCase(0, TestName = "A window of no tokens")]
|
||||
[TestCase(-1, TestName = "A window of negative tokens")]
|
||||
[TestCase(null, TestName = "No window at all")]
|
||||
public void AWindowWhichIsNoWidthIsDroppedRatherThanRepaired(int? tokens)
|
||||
{
|
||||
//
|
||||
// Every dialect comes through this one factory, so a provider answering with something
|
||||
// nobody can interpret falls back to what the rules say -- and does so the same way for
|
||||
// all of them, rather than once per provider and slightly differently each time.
|
||||
//
|
||||
Assert.That(ModelListing.For(MODEL, tokens), Is.EqualTo(ModelListing.NOTHING));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AnEntryWithoutANameIsNoListing()
|
||||
{
|
||||
Assert.That(ModelListing.For(string.Empty, 32_768), Is.EqualTo(ModelListing.NOTHING));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user