Skip to content

Commit ea38706

Browse files
eric-hsiungcobot
authored andcommitted
Restore is_in_room to DSL so that we can test object detection
1 parent e6c79cb commit ea38706

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

code_generation/openai_chat_completion_prefix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Robot task programs may use the following functions:
88
get_current_location()
99
get_all_rooms()
10+
is_in_room()
1011
go_to(location)
1112
ask(person, question, options)
1213
say(message)
@@ -23,6 +24,10 @@ def get_current_location() -> str:
2324
def get_all_rooms() -> list[str]:
2425
...
2526
27+
# Check if an object is in the current room.
28+
def is_in_room(object : str) -> bool:
29+
...
30+
2631
# Go to a specific named location, e.g. go_to("kitchen"), go_to("Arjun's office"), go_to("Jill's study").
2732
def go_to(location : str) -> None:
2833
...

code_generation/openai_chat_completion_prefix_minimal.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Robot task programs may use the following functions:
88
get_current_location()
99
get_all_rooms()
10+
is_in_room()
1011
go_to(location)
1112
ask(person, question, options)
1213
say(message)
@@ -23,6 +24,10 @@ def get_current_location() -> str:
2324
def get_all_rooms() -> list[str]:
2425
...
2526
27+
# Check if an object is in the current room.
28+
def is_in_room(object : str) -> bool:
29+
...
30+
2631
# Go to a specific named location, e.g. go_to("kitchen"), go_to("Arjun's office"), go_to("Jill's study").
2732
def go_to(location : str) -> None:
2833
...

code_generation/prompt_prefix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Robot task programs may use the following functions:
44
get_current_location()
55
get_all_rooms()
6+
is_in_room()
67
go_to(location)
78
ask(person, question, options)
89
say(message)
@@ -20,6 +21,10 @@ def get_current_location() -> str:
2021
def get_all_rooms() -> list[str]:
2122
...
2223

24+
# Check if an object is in the current room.
25+
def is_in_room(object : str) -> bool:
26+
...
27+
2328
# Go to a specific named location, e.g. go_to("kitchen"), go_to("Arjun's office"), go_to("Jill's study").
2429
def go_to(location : str) -> None:
2530
...

code_generation/prompt_prefix_minimal.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Robot task programs may use the following functions:
44
get_current_location()
55
get_all_rooms()
6+
is_in_room()
67
go_to(location)
78
ask(person, question, options)
89
say(message)
@@ -20,6 +21,10 @@ def get_current_location() -> str:
2021
def get_all_rooms() -> list[str]:
2122
...
2223

24+
# Check if an object is in the current room.
25+
def is_in_room(object : str) -> bool:
26+
...
27+
2328
# Go to a specific named location, e.g. go_to("kitchen"), go_to("Arjun's office"), go_to("Jill's study").
2429
def go_to(location : str) -> None:
2530
...

0 commit comments

Comments
 (0)