From 1b2688d1e1eb95f3777cdb623b55b7997af26337 Mon Sep 17 00:00:00 2001 From: kswdev0 Date: Fri, 27 Mar 2026 11:03:02 +0900 Subject: [PATCH] refactor: update AIPlanner response format to JSON and simplify structure --- ai_planner.py | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/ai_planner.py b/ai_planner.py index fb1d655..801ed1c 100644 --- a/ai_planner.py +++ b/ai_planner.py @@ -110,7 +110,11 @@ state_reader가 상태 요약에 포함하는 `마지막 행동(기억)` 섹션 - "start_research" → {"tech": "automation"} ### 대기 -- "wait" → {"seconds": int}""" +- "wait" → {"seconds": int} + +## 응답 형식 +반드시 아래 JSON 형식으로만 응답하세요. 마크다운이나 설명 텍스트 없이 순수 JSON만 출력하세요. +{"thinking": "상황 분석 내용", "current_goal": "현재 목표", "actions": [{"action": "액션명", "params": {...}, "reason": "이유"}], "after_this": "다음 계획"}""" def _debug_enabled() -> bool: @@ -198,27 +202,7 @@ class AIPlanner: {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": user_message}, ], - "format": { - "type": "object", - "properties": { - "thinking": {"type": "string"}, - "current_goal": {"type": "string"}, - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "action": {"type": "string"}, - "params": {"type": "object"}, - "reason": {"type": "string"}, - }, - "required": ["action", "params"], - }, - }, - "after_this": {"type": "string"}, - }, - "required": ["actions"], - }, + "format": "json", "think": False, "stream": False, "options": {"temperature": 0.3, "num_ctx": 8192},