-
Notifications
You must be signed in to change notification settings - Fork 2
[FEAT] AI 멘토 질문 및 답변 스트리밍 API 구현 #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4f9d009
feat: AI 멘토 질문 스트리밍을 구현 (#88)
ownue f494c71
Merge branch 'develop' of https://github.com/Musereview/BE into feat/…
ownue c874eea
Merge branch 'develop' of https://github.com/Musereview/BE into feat/…
ownue 1910417
Merge branch 'develop' of https://github.com/Musereview/BE into feat/…
ownue d51f940
fix: AI 멘토 락 및 에러 코드와 DB 스키마 정합성 보완 (#88)
ownue 6d81206
fix: AI 멘토 이전 스트리밍 취소와 SSE 파싱을 보완 (#88)
ownue 8e66d2b
fix: AI 멘토 복구 응답과 예외 테스트를 보완 (#88)
ownue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/com/mr/domain/mentor/dto/req/MentorQuestionRequestDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.mr.domain.mentor.dto.req; | ||
|
|
||
| public record MentorQuestionRequestDTO(String content) { | ||
| } |
42 changes: 42 additions & 0 deletions
42
src/main/java/com/mr/domain/mentor/dto/res/MentorStreamEventDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| package com.mr.domain.mentor.dto.res; | ||
|
|
||
| import com.fasterxml.jackson.databind.JsonNode; | ||
| import com.mr.domain.mentor.entity.MentorMessage; | ||
| import com.mr.domain.mentor.entity.enums.MessageRole; | ||
| import java.time.LocalDateTime; | ||
|
|
||
| public final class MentorStreamEventDTO { | ||
|
|
||
| private MentorStreamEventDTO() { | ||
| } | ||
|
|
||
| public record Start(Long analysisId, Long mentorChatSessionId, Message userMessage) { | ||
| } | ||
|
|
||
| public record Chunk(String content) { | ||
| } | ||
|
|
||
| public record Complete(Message assistantMessage) { | ||
| } | ||
|
|
||
| public record Error(String code, String message) { | ||
| } | ||
|
|
||
| public record Message(Long mentorMessageId, MessageRole role, JsonNode referencesJson, | ||
| String content, LocalDateTime createdAt) { | ||
|
|
||
| public static Message user(MentorMessage message) { | ||
| return new Message(message.getId(), message.getRole(), null, message.getContent(), message.getCreatedAt()); | ||
| } | ||
|
|
||
| public static Message assistant(MentorMessage message, JsonNode referencesJson) { | ||
| return new Message( | ||
| message.getId(), | ||
| message.getRole(), | ||
| referencesJson, | ||
| message.getContent(), | ||
| message.getCreatedAt() | ||
| ); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
|
|
||
| public enum MentorChatStatus { | ||
| ACTIVE, | ||
| GENERATING, | ||
| CLOSED, | ||
| DISABLED | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/java/com/mr/domain/mentor/repository/MentorChatSessionRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.