diff --git a/src/main/java/com/easylead/easylead/domain/gpt/dto/Message.java b/src/main/java/com/easylead/easylead/domain/gpt/dto/Message.java index 833f5df..783a36f 100644 --- a/src/main/java/com/easylead/easylead/domain/gpt/dto/Message.java +++ b/src/main/java/com/easylead/easylead/domain/gpt/dto/Message.java @@ -1,5 +1,6 @@ package com.easylead.easylead.domain.gpt.dto; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.*; @NoArgsConstructor @@ -8,6 +9,8 @@ @Setter @Builder + +@JsonIgnoreProperties(ignoreUnknown = true) public class Message { String content; String role; diff --git a/src/main/java/com/easylead/easylead/domain/text/business/TextBusiness.java b/src/main/java/com/easylead/easylead/domain/text/business/TextBusiness.java index 5f260a1..2c43a10 100644 --- a/src/main/java/com/easylead/easylead/domain/text/business/TextBusiness.java +++ b/src/main/java/com/easylead/easylead/domain/text/business/TextBusiness.java @@ -58,8 +58,8 @@ public TextFileResDTO easyToReadImage(MultipartFile file) throws JsonProcessingE log.info("=========== reqText : "+reqText+"============"); - HttpRequest request = gptService.requestGPTCustom(reqText); - TextFileResDTO result = textConverter.toTextFileResDTO(gptService.responseGPT(request)); - return result; + HttpRequest request = gptService.requestGPT(reqText,"gpt-4o-mini"); + return TextFileResDTO.builder().text(gptService.responseGPT(request)).build(); + } } diff --git a/src/main/java/com/easylead/easylead/domain/text/controller/TextController.java b/src/main/java/com/easylead/easylead/domain/text/controller/TextController.java index e6e694f..9711ffa 100644 --- a/src/main/java/com/easylead/easylead/domain/text/controller/TextController.java +++ b/src/main/java/com/easylead/easylead/domain/text/controller/TextController.java @@ -25,6 +25,7 @@ public class TextController { @PostMapping(value = "/image") public ResponseEntity easyToReadImage( + @RequestPart(value = "image") MultipartFile file) throws JsonProcessingException { return ResponseEntity.ok(textBusiness.easyToReadImage(file));