모델 미지정 시 서버 기본(guardia.ollama-text-model). localhost Ollama 만 호출하며,
+ * 장애/오프라인/타임아웃 시 예외 없이 빈 문자열 반환(호출자가 폴백 수행). [GUARDiA-MALL]
+ */
+ @SuppressWarnings("unchecked")
+ public String generateText(String prompt, String reqModel) {
+ if (prompt == null || prompt.isBlank()) return "";
+ String useModel = (reqModel == null || reqModel.isBlank()) ? model : reqModel.trim();
try {
- Map mall_setting(key='ai.*')에 저장된 런타임 설정을 조회/갱신/테스트한다. API 키는 환경변수
+ * (ANTHROPIC_API_KEY)로만 주입되어 응답·로그에 노출되지 않는다(GET 은 {@code claudeKeySet} 불리언만).
+ * 설정 변경은 재기동 없이 다음 AI 호출부터 반영된다.
+ *
+ * 👍/👎(+교정)을 둘 다 기록한다:
+ * 불변: 중앙 전달 실패는 예외 미전파(로컬 기록은 유지). 응답에 키·PII·스택트레이스 미노출.
+ * 외부 호출 금지 — 중앙 rag 는 서버 내부 루프백(127.0.0.1:8020)이다.
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/ai/feedback")
+@RequiredArgsConstructor
+public class AiFeedbackController {
+
+ private final MallLearningStore learningStore;
+ private final WebClient.Builder webClientBuilder;
+ private final RagProperties ragProps;
+
+ @PostMapping
+ public ApiResponse
+ *
+ */
+@RestController
+@RequestMapping("/api/admin/ai-config")
+@RequiredArgsConstructor
+public class AiConfigController {
+
+ private final AiConfigService service;
+
+ @GetMapping
+ public ApiResponse
+ *
+ *
+ *