Capture and safely recover shared LLM responses with bounded field repairs
This commit is contained in:
1 parent
c6f4ea9877
commit
da1ea9c3a3
25 files changed
+1002
-46
No files matched your search
@@ -113,6 +113,7 @@ def test_hypothesis_set_corrected_atomically(interpreted_case):
|
||||
store = interpreted_case[0]
|
||||
def duplicate(document, context):
|
||||
document["hypotheses"][1]["title"] = document["hypotheses"][0]["title"]
|
||||
document["hypotheses"][1]["mechanism"] = document["hypotheses"][0]["mechanism"]
|
||||
class Toggle(ProposalAdapter):
|
||||
async def generate(self, *args, **kwargs):
|
||||
self.change = duplicate if not self.requests else None
|
||||
@@ -139,7 +140,9 @@ def test_config_rejects_invalid_bounds(value):
|
||||
|
||||
def test_hypotheses_exhaustion_preserves_interpretation_and_exports_review(interpreted_case):
|
||||
store = interpreted_case[0]
|
||||
def duplicate(document, context): document["hypotheses"][1]["title"] = document["hypotheses"][0]["title"]
|
||||
def duplicate(document, context):
|
||||
document["hypotheses"][1]["title"] = document["hypotheses"][0]["title"]
|
||||
document["hypotheses"][1]["mechanism"] = document["hypotheses"][0]["mechanism"]
|
||||
adapter = ProposalAdapter(duplicate)
|
||||
g = gateway(adapter)
|
||||
builder = HypothesisBuilder(store, g, correction_config=CorrectionConfig(2))
|
||||
|
||||
Reference in new issue
Block a user