MCPcopy Create free account
hub / github.com/OthersideAI/self-operating-computer / run_test_case

Function run_test_case

evaluate.py:119–133  ·  view source on GitHub ↗

Returns True if the result of the test with the given prompt meets the given guideline for the given model.

(objective, guideline, model)

Source from the content-addressed store, hash-verified

117
118
119def run_test_case(objective, guideline, model):
120 """Returns True if the result of the test with the given prompt meets the given guideline for the given model."""
121 # Run `operate` with the model to evaluate and the test case prompt
122 subprocess.run(
123 ["operate", "-m", model, "--prompt", f'"{objective}"'],
124 stdout=subprocess.DEVNULL,
125 )
126
127 try:
128 result = evaluate_final_screenshot(guideline)
129 except OSError:
130 print("[Error] Couldn't open the screenshot for evaluation")
131 return False
132
133 return result
134
135
136def get_test_model():

Callers 1

mainFunction · 0.85

Calls 1

Tested by

no test coverage detected