Skip to content

Commit

Permalink
refactor: requiredArgsConstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
osoohynn committed Nov 28, 2024
1 parent 0db0d4b commit fd23a63
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.project.oof.gpt.controller;

import com.project.oof.gpt.service.ChatGPTService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand All @@ -12,15 +13,12 @@

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api")
public class ChatGPTController {

private final ChatGPTService chatGPTService;

public ChatGPTController(ChatGPTService chatGPTService) {
this.chatGPTService = chatGPTService;
}

@PostMapping("/prompt")
public ResponseEntity<String> selectPrompt(@RequestBody String message) {
String result = chatGPTService.prompt(message);
Expand Down

0 comments on commit fd23a63

Please sign in to comment.