package com.caliverse.admin.domain.api;

import com.caliverse.admin.domain.request.AIRequest;
import com.caliverse.admin.domain.response.AIResponse;
import com.caliverse.admin.domain.service.AIService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "AI 관련", description = "AI api 입니다.")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/ai")

public class AIController {

    private final AIService aiService;

    @PostMapping("/analyze")
    public ResponseEntity<AIResponse> aiAnalyze(@RequestBody AIRequest dataRequest){
        return ResponseEntity.ok().body(aiService.aiMessageAnalyze(dataRequest));
    }
}
