mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-07 06:15:58 -10:00
serve tests: the refused-prompt test runs in strict mode (fit_max_tokens off) so a huge max_tokens is refused, not shortened
This commit is contained in:
1 parent
9a58a4b73a
commit
59cee65da3
1 file changed
+1
@@ -116,6 +116,7 @@ class Served(unittest.TestCase):
|
||||
|
||||
def test_a_refused_prompt_is_not_kept(self):
|
||||
svc = self.service(max_context=4096)
|
||||
svc.fit_max_tokens = False # the strict mode refuses an over-long max_tokens (the default now shortens it)
|
||||
msgs = [{"role": "user", "content": "kept " * 20}]
|
||||
svc.prepare(msgs, None, {}, 16)
|
||||
refused = msgs + [{"role": "assistant", "content": "a"}, {"role": "user", "content": "more " * 20}]
|
||||
|
||||
Reference in new issue
Block a user