You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertlen(self.m.last_prompt()) ==1, "Last prompt should only have only one instruction inside - independent of sampling iterations."
47
+
48
+
deftest_ctx_for_agentic(self):
49
+
self.m.ctx.reset()
50
+
res=self.m.instruct(
51
+
"Write a sentence.",
52
+
requirements=[
53
+
"be funny",
54
+
"be formal",
55
+
"use only words starting with the letter w",
56
+
],
57
+
strategy=AgenticSamplingStrategy(loop_budget=3),
58
+
return_sampling_results=True,
59
+
)
60
+
61
+
self._run_asserts_for_ctx_testing(res)
62
+
63
+
assertlen(self.m.last_prompt()) ==len(res.sample_generations)*2-1, "For n sampling iterations there should be 2n-1 prompt conversation elements in the last prompt."
0 commit comments