File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 77
88from dotenv import load_dotenv
99
10- SUMMARY_SCREENSHOT_PATH = os .path .join ('screenshots' , 'summary_screenshot.png' )
10+ TEST_CASES = {
11+ "Go to Google.com" : "The Google home page is visible with the search bar." ,
12+ "Play a video on YouTube" : "A YouTube video is playing." ,
13+ }
1114
1215EVALUATION_PROMPT = """
1316Your job is to look at the given screenshot and determine if the following guideline is met in the image.
1720Guideline: {guideline}
1821"""
1922
23+ SUMMARY_SCREENSHOT_PATH = os .path .join ('screenshots' , 'summary_screenshot.png' )
24+
2025# Check if on a windows terminal that supports ANSI escape codes
2126def supports_ansi ():
2227 """
@@ -116,17 +121,10 @@ def run_test_case(objective, guideline):
116121def main ():
117122 load_dotenv ()
118123 openai .api_key = os .getenv ("OPENAI_API_KEY" )
119-
120- # Define the test cases and the guidelines
121- test_cases = {
122- "Go to Google.com" : "The Google home page is visible with the search bar." ,
123- "Open YouTube and play holiday music" : "The YouTube video player is loaded and actively playing holiday music." ,
124- "Open Google Docs and write a poem" : "A Google Doc file is opened in the browser with a poem typed into it." ,
125- }
126124
127125 print (f"{ ANSI_BRIGHT_MAGENTA } [STARTING EVALUATION]{ ANSI_RESET } NOTE: `operate` output is silenced." )
128126
129- for objective , guideline in test_cases .items ():
127+ for objective , guideline in TEST_CASES .items ():
130128 print (f"{ ANSI_BLUE } [EVALUATING]{ ANSI_RESET } '{ objective } '" )
131129
132130 result = run_test_case (objective , guideline )
You can’t perform that action at this time.
0 commit comments