Skip to content

Commit

Permalink
#50 feat: 채팅방 초기 설정 관련 컨트롤러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
letskuku committed Jul 30, 2023
1 parent 86ee817 commit 2dc5106
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.example.cherrypickserver.chat.application.ChatService;
import com.example.cherrypickserver.chat.dto.GptRequest;
import com.example.cherrypickserver.chat.dto.GptResponse;
import com.example.cherrypickserver.chat.dto.request.ChatRequest;
import com.example.cherrypickserver.chat.dto.response.ChatResponse;
import com.example.cherrypickserver.global.dto.ResponseCustom;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
Expand All @@ -14,9 +16,14 @@ public class ChatController {

private final ChatService chatService;

@PostMapping("/")
public ResponseCustom<ChatResponse> createChatAndContent(@RequestBody ChatRequest chatRequest) {
return ResponseCustom.OK(chatService.createChatAndContent(chatRequest));
}

@PostMapping("/qna")
public ResponseCustom<GptResponse> chatCompletion(@RequestBody GptRequest gptRequest) {
return ResponseCustom.OK(chatService.chatCompletion(gptRequest));
public ResponseCustom<GptResponse> chatQuestion(@RequestBody GptRequest gptRequest) {
return ResponseCustom.OK(chatService.chatQuestion(gptRequest));
}

@GetMapping("/select/{articleId}")
Expand Down

0 comments on commit 2dc5106

Please sign in to comment.