Skip to content

Commit

Permalink
Merge pull request #47 from studio-recoding/feat-ai-api
Browse files Browse the repository at this point in the history
[🚀feat] API 스팩 변경 반영(페르소나 적용)
  • Loading branch information
JeonHaeseung authored Apr 28, 2024
2 parents 8423242 + 0b803f7 commit ab00797
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/main/java/Ness/Backend/domain/chat/ChatController.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ public ResponseEntity<GetChatListDto> getUserChat(@AuthUser Member member){
return new ResponseEntity<>(oneUserChats, HttpStatusCode.valueOf(200));
}

/*
@PostMapping("")
@Operation(summary = "새로운 채팅으로 AI와 통신", description = "새로운 채팅 내역을 저장하고, AI의 응답을 받는 API 입니다.")
public ResponseEntity<GetAiChatDto> postAiChat(@AuthUser Member member, @RequestBody PostUserChatDto postUserChatDto){
GetAiChatDto answer = chatService.postNewUserChat(member.getId(), postUserChatDto);
return new ResponseEntity<>(answer, HttpStatusCode.valueOf(200));
}*/


// 03-29 수정 버전
@PostMapping("")
@Operation(summary = "새로운 채팅으로 AI와 통신", description = "새로운 채팅 내역을 저장하고, 새로운 내역을 포함해서 AI의 응답을 받는 API 입니다.")
public ResponseEntity<GetChatListDto> postAiChat(@AuthUser Member member, @RequestBody PostUserChatDto postUserChatDto) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/Ness/Backend/domain/chat/ChatService.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public String parseAiChat(String text){
public PostFastApiAiChatDto postNewAiChat(Long id, String text){

PostFastApiUserChatDto userDto = PostFastApiUserChatDto.builder()
.persona("default")
.message(text)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
public class PostFastApiUserChatDto {
@JsonProperty("prompt")
private String message;

@JsonProperty("persona")
private String persona;
}

0 comments on commit ab00797

Please sign in to comment.