diff --git a/backend_service/generated_visualizations/py_tree.png b/backend_service/generated_visualizations/py_tree.png index 16912948..074d6a2a 100644 Binary files a/backend_service/generated_visualizations/py_tree.png and b/backend_service/generated_visualizations/py_tree.png differ diff --git a/backend_service/src/__pycache__/py_tree_generator.cpython-310.pyc b/backend_service/src/__pycache__/py_tree_generator.cpython-310.pyc index 96dc69bc..e88ff241 100644 Binary files a/backend_service/src/__pycache__/py_tree_generator.cpython-310.pyc and b/backend_service/src/__pycache__/py_tree_generator.cpython-310.pyc differ diff --git a/backend_service/src/prompts/simple_mode_prompt.txt b/backend_service/src/prompts/simple_mode_prompt.txt index a5c20bcd..bb587c39 100644 --- a/backend_service/src/prompts/simple_mode_prompt.txt +++ b/backend_service/src/prompts/simple_mode_prompt.txt @@ -21,13 +21,13 @@ {"name": "fly_to_waypoint", "description": "导航至一个指定坐标点。使用相对坐标系(x,y,z),单位为米。", "params": {"x": "float", "y": "float", "z": "float", "acceptance_radius": "float, 可选,默认2.0"}}, {"name": "move_direction", "description": "按指定方向直线移动。方向可为绝对方位或相对机体朝向。", "params": {"direction": "string: north|south|east|west|forward|backward|left|right", "distance": "float[1,10000], 可选, 不指定则持续移动"}}, {"name": "orbit_around_point", "description": "以给定中心点为中心,等速圆周飞行指定圈数。", "params": {"center_x": "float", "center_y": "float", "center_z": "float", "radius": "float[5,1000]", "laps": "int[1,20]", "clockwise": "boolean, 可选, 默认true", "speed_mps": "float[0.5,15], 可选", "gimbal_lock": "boolean, 可选, 默认true"}}, - {"name": "orbit_around_target", "description": "以目标为中心,等速圆周飞行指定圈数(需已有目标)。", "params": {"target_class": "string, 见复杂模式定义列表", "description": "string, 可选", "radius": "float[5,1000]", "laps": "int[1,20]", "clockwise": "boolean, 可选, 默认true", "speed_mps": "float[0.5,15], 可选", "gimbal_lock": "boolean, 可选, 默认true"}}, + {"name": "orbit_around_target", "description": "以目标为中心,等速圆周飞行指定圈数(需已有目标)。", "params": {"target_class": "string, 取值同object_detect列表", "description": "string, 可选", "radius": "float[5,1000]", "laps": "int[1,20]", "clockwise": "boolean, 可选, 默认true", "speed_mps": "float[0.5,15], 可选", "gimbal_lock": "boolean, 可选, 默认true"}}, {"name": "loiter", "description": "在当前位置上空悬停一段时间或直到条件触发。", "params": {"duration": "float, 可选[1,600]", "until_condition": "string, 可选"}}, - {"name": "object_detect", "description": "识别特定目标对象。", "params": {"target_class": "string, 见复杂模式定义列表", "description": "string, 可选", "count": "int, 可选, 默认1"}}, + {"name": "object_detect", "description": "识别特定目标对象。一般是用户提到的需要检测的目标;如果用户给出了需要探索的目标的优先级,比如蓝色球危险性大于红色球大于绿色球,需要检测最危险的球,此处应给出检测优先级,描述应当为 '蓝>红>绿'", "params": {"target_class": "string, 要识别的目标类别,必须为以下值之一: balloon,person, bicycle, car, motorcycle, airplane, bus, train, truck, boat, traffic_light, fire_hydrant, stop_sign, parking_meter, bench, bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe, backpack, umbrella, handbag, tie, suitcase, frisbee, skis, snowboard, sports_ball, kite, baseball_bat, baseball_glove, skateboard, surfboard, tennis_racket, bottle, wine_glass, cup, fork, knife, spoon, bowl, banana, apple, sandwich, orange, broccoli, carrot, hot_dog, pizza, donut, cake, chair, couch, potted_plant, bed, dining_table, toilet, tv, laptop, mouse, remote, keyboard, cell_phone, microwave, oven, toaster, sink, refrigerator, book, clock, vase, scissors, teddy_bear, hair_drier, toothbrush", "description": "string, 可选", "count": "int, 可选, 默认1"}}, {"name": "strike_target", "description": "对已识别目标进行打击。", "params": {"target_class": "string", "description": "string, 可选", "count": "int, 可选, 默认1"}}, {"name": "battle_damage_assessment", "description": "战损评估。", "params": {"target_class": "string", "assessment_time": "float[5-60], 默认15.0"}}, {"name": "search_pattern", "description": "按模式搜索。", "params": {"pattern_type": "string: spiral|grid", "center_x": "float", "center_y": "float", "center_z": "float", "radius": "float[5,1000]", "target_class": "string", "description": "string, 可选", "count": "int, 可选, 默认1"}}, - {"name": "track_object", "description": "持续跟踪目标。", "params": {"target_class": "string, 见复杂模式定义列表", "description": "string, 可选", "track_time": "float[1,600], 默认30.0", "min_confidence": "float[0.5-1.0], 默认0.7", "safe_distance": "float[2-50], 默认10.0"}}, + {"name": "track_object", "description": "持续跟踪目标。", "params": {"target_class": "string, 取值同object_detect列表", "description": "string, 可选", "track_time": "float[1,600], 默认30.0", "min_confidence": "float[0.5-1.0], 默认0.7", "safe_distance": "float[2-50], 默认10.0"}}, {"name": "deliver_payload", "description": "投放物资。", "params": {"payload_type": "string", "release_altitude": "float[2,100], 默认5.0"}}, {"name": "preflight_checks", "description": "飞行前系统自检。", "params": {"check_level": "string: basic|comprehensive"}}, {"name": "emergency_return", "description": "执行紧急返航程序。", "params": {"reason": "string"}} @@ -53,7 +53,6 @@ - orbit_around_target.radius: [5, 1000] - orbit_around_point/target.laps: [1, 20] - orbit_around_point/target.speed_mps: [0.5, 15] -- 电池阈值等同复杂模式(如需涉及) - 若参考知识提供坐标,必须使用并裁剪到约束范围内 —— 口令转化规则(环绕类)—— diff --git a/tools/knowledge_base/export_knowledge.ndjson b/tools/knowledge_base/export_knowledge.ndjson index d7df0dc3..5b9ecf55 100644 --- a/tools/knowledge_base/export_knowledge.ndjson +++ b/tools/knowledge_base/export_knowledge.ndjson @@ -1,3 +1,5 @@ {"text": "在地图上有一个名为 '跷跷板' 的地点或区域,它的leisure是'playground',其中心位置坐标大约在 (x:15, y:-8.5, z:1.2)。"} {"text": "在地图上有一个名为 'A地' 的地点或区域,它的building是'commercial',其中心位置坐标大约在 (x:10, y:-10, z:2)。"} {"text": "在地图上有一个名为 '学生宿舍' 的地点或区域,它的building是'dormitory',其中心位置坐标大约在 (x:5, y:3, z:2)。"} +{"text": "在地图上有一个名为 '作业区域' 的地点或区域,它的building是'commercial',其中心位置坐标大约在 (x:13.0, y:0.0, z:1.5)。"} +{"text": "在地图上有一个名为 '搜索区' 的地点或区域,它的building是'restaurant',其中心位置坐标大约在 (x:8.0, y:0.0, z:1.5)。"} \ No newline at end of file diff --git a/tools/test_api.py b/tools/test_api.py index 156b1840..fcdb6b85 100644 --- a/tools/test_api.py +++ b/tools/test_api.py @@ -12,7 +12,7 @@ BASE_URL = "http://127.0.0.1:8000" ENDPOINT = "/generate_plan" # The user prompt we will send for the test -TEST_PROMPT = "飞到学生宿舍" +TEST_PROMPT = "起飞" def test_generate_plan(): """ diff --git a/tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/data_level0.bin b/tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/data_level0.bin similarity index 100% rename from tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/data_level0.bin rename to tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/data_level0.bin diff --git a/tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/header.bin b/tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/header.bin similarity index 100% rename from tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/header.bin rename to tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/header.bin diff --git a/tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/length.bin b/tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/length.bin similarity index 100% rename from tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/length.bin rename to tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/length.bin diff --git a/tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/link_lists.bin b/tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/link_lists.bin similarity index 100% rename from tools/vector_store/2298535b-1808-4498-8a3a-59146f62ce97/link_lists.bin rename to tools/vector_store/28cecd16-3403-4fd2-8e19-e7a57ff011b6/link_lists.bin diff --git a/tools/vector_store/chroma.sqlite3 b/tools/vector_store/chroma.sqlite3 index 84e50c59..96bbba24 100644 Binary files a/tools/vector_store/chroma.sqlite3 and b/tools/vector_store/chroma.sqlite3 differ