Repository navigation
fix(ai): 블록 불가 문장 거절과 총 이동 4 m 한도 보정 - #152
Merged
Merged
Conversation
- 동작 단어가 없거나 앉기·한 글자 문장은 모델 호출 전에 422로 거절 (Server 는 503 으로 바꿔 Client 로컬 규칙 폴백) - 초안의 총 이동이 4.0 m 를 넘으면 거리를 비율대로 줄임 (예: 네모 2 m×4 → 1 m×4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
오늘 시연을 앞두고 관람객이 실제로 쓸 법한 문장 20개를 로컬 추론 서비스(Q4_K_M)에 넣어 봤다. 모델은 어떤 문장이든 블록을 만들어 내서 "밥 먹자"가
앞으로 1 m가 되었고, "앉아"는일어서기가 되었다. 또 "네모 모양으로 걸어"는 2 m×4 = 8 m 초안이 나왔는데, 실행 1회 총 이동 한도(4.0 m,BlockProgramLimits.MAX_TOTAL_DISTANCE_METERS)를 넘어 실행 단계에서 거절된다.변경
ai/poppy_ai/guard.pyis_actionable: 동작 단어가 없는 문장, 앉기, 한 글자 문장은 모델을 부르지 않고 422로 거절한다. Server 는 비정상 응답을 503 으로 바꾸므로 Client 는 로컬 규칙으로 폴백한다.cap_total_distance: 총 이동이 4.0 m 를 넘는 초안은 거리를 비율대로 0.1 m 단위로 내림해 줄인다.server.py에 두 기능을 연결하고 테스트를 추가했다.검증
python -m pytest -q(ai/): 714 passedRefs #130 (#130 은 베이스 모델 비교가 남아 열어 둔다)
🤖 Generated with Claude Code