-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
20 lines (17 loc) · 971 Bytes
/
Copy pathapp.py
File metadata and controls
20 lines (17 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from input_layer.intent_filter import is_robot_relevant_command
from middleware.pipeline import run_middleware
from utils.env_loader import load_environment
class DummyLLM:
def generate(self, prompt):
return """{
\"step 1\": {"motion": "fetch", "object": "handy", "start point": {"x": 0, "y": 0, "z": 0}, "end point": null, "explanation": "Fetch 'handy'.", "action": "act"},
\"step 2\": {"motion": "move", "object": "handy", "start point": {"x": 0, "y": 0, "z": 0}, "end point": {"x": -5, "y": -5, "z": -5}, "explanation": "Move to fruit.", "action": "act"}
}"""
if __name__ == "__main__":
user_input = "Can you move the handy next to the fruit?"
if not is_robot_relevant_command(user_input):
print({"status": "ignored", "reason": "Command not intended for robotic arm."})
else:
env = load_environment()
result = run_middleware(user_input, env, llm_model=DummyLLM())
print(result)