2020</html>
2121"""
2222
23+ base_obs = {
24+ "goal" : "do this and that" ,
25+ "goal_object" : [{"type" : "text" , "text" : "do this and that" }],
26+ "chat_messages" : [{"role" : "user" , "message" : "do this and that" }],
27+ "axtree_txt" : "[1] Click me" ,
28+ "focused_element_bid" : "45-256" ,
29+ "open_pages_urls" : ["https://example.com" ],
30+ "open_pages_titles" : ["Example" ],
31+ "active_page_index" : 0 ,
32+ }
2333
2434OBS_HISTORY = [
25- {
26- "goal" : "do this and that" ,
27- "goal_object" : [{"type" : "text" , "text" : "do this and that" }],
28- "chat_messages" : [{"role" : "user" , "message" : "do this and that" }],
35+ base_obs | {
2936 "pruned_html" : html_template .format (1 ),
30- "axtree_txt" : "[1] Click me" ,
31- "focused_element_bid" : "45-256" ,
3237 "last_action_error" : "" ,
3338 },
34- {
35- "goal" : "do this and that" ,
36- "goal_object" : [{"type" : "text" , "text" : "do this and that" }],
37- "chat_messages" : [{"role" : "user" , "message" : "do this and that" }],
39+ base_obs | {
3840 "pruned_html" : html_template .format (2 ),
39- "axtree_txt" : "[1] Click me" ,
40- "focused_element_bid" : "45-256" ,
4141 "last_action_error" : "Hey, this is an error in the past" ,
4242 },
43- {
44- "goal" : "do this and that" ,
45- "goal_object" : [{"type" : "text" , "text" : "do this and that" }],
46- "chat_messages" : [{"role" : "user" , "message" : "do this and that" }],
43+ base_obs | {
4744 "pruned_html" : html_template .format (3 ),
48- "axtree_txt" : "[1] Click me" ,
49- "focused_element_bid" : "45-256" ,
5045 "last_action_error" : "Hey, there is an error now" ,
5146 },
5247]
5853 obs = dp .ObsFlags (
5954 use_html = True ,
6055 use_ax_tree = True ,
56+ use_tabs = True ,
6157 use_focused_element = True ,
6258 use_error_logs = True ,
6359 use_history = True ,
104100 "obs.use_ax_tree" ,
105101 ("AXTree:" , "Click me" ),
106102 ),
103+ (
104+ "obs.use_tabs" ,
105+ ("Currently open tabs:" ,"(active tab)" ),
106+ ),
107107 (
108108 "obs.use_focused_element" ,
109109 ("Focused element:" , "bid='45-256'" ),
@@ -251,11 +251,6 @@ def test_main_prompt_elements_present():
251251 # for debugging
252252 test_shrinking_observation ()
253253 test_main_prompt_elements_present ()
254- for flag , expected_prompts in FLAG_EXPECTED_PROMPT :
255- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
256- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
257- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
258- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
259- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
260- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
261- test_main_prompt_elements_gone_one_at_a_time (flag , expected_prompts )
254+ # for flag, expected_prompts in FLAG_EXPECTED_PROMPT:
255+ # test_main_prompt_elements_gone_one_at_a_time(flag, expected_prompts)
256+
0 commit comments