File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 55import base64
66import json
77import openai
8+ import argparse
89
910from dotenv import load_dotenv
1011
1112# "Objective for `operate`" : "Guideline for passing this test case given to GPT-4v"
1213TEST_CASES = {
13- "Go to Github.com" : "The Github home page is visible." ,
14+ "Go to Github.com" : "A Github page is visible." ,
1415 "Go to Youtube.com and play a video" : "The YouTube video player is visible." ,
1516}
1617
@@ -124,10 +125,29 @@ def run_test_case(objective, guideline):
124125 return result
125126
126127
128+ def get_test_model ():
129+ parser = argparse .ArgumentParser (
130+ description = "Run the self-operating-computer with a specified model."
131+ )
132+
133+ parser .add_argument (
134+ "-m" ,
135+ "--model" ,
136+ help = "Specify the model to evaluate." ,
137+ required = False ,
138+ default = "gpt-4-with-ocr" ,
139+ )
140+
141+ return parser .parse_args ().model
142+
143+
127144def main ():
128145 load_dotenv ()
129146 openai .api_key = os .getenv ("OPENAI_API_KEY" )
130147
148+ model = get_test_model ()
149+
150+ print (f"{ ANSI_BLUE } [EVALUATING MODEL `{ model } `]{ ANSI_RESET } " )
131151 print (f"{ ANSI_BRIGHT_MAGENTA } [STARTING EVALUATION]{ ANSI_RESET } " )
132152
133153 passed = 0 ; failed = 0
You can’t perform that action at this time.
0 commit comments