-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AI 대화를 위해 컨트롤러를 추가했습니다. AiService에서 새로운 요청 핸들러를 구현했습니다. 이제 특정 키워드에 대한 일정, 급식, 공지 등을 제공합니다.
- Loading branch information
1 parent
d3c456b
commit f5dbe1e
Showing
2 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/main/kotlin/com/seugi/api/domain/ai/presentation/AiController.kt
This file contains 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,29 @@ | ||
package com.seugi.api.domain.ai.presentation | ||
|
||
import com.seugi.api.domain.ai.service.AiService | ||
import com.seugi.api.domain.chat.presentation.websocket.dto.ChatMessageDto | ||
import com.seugi.api.global.common.annotation.GetAuthenticatedId | ||
import com.seugi.api.global.response.BaseResponse | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.RequestBody | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
@RequestMapping("/ai") | ||
class AiController( | ||
private val aiService: AiService, | ||
) { | ||
|
||
@GetMapping | ||
fun generatedAiChatbot( | ||
@RequestBody chatMessageDto: ChatMessageDto, | ||
@GetAuthenticatedId userId: Long, | ||
): BaseResponse<String> { | ||
return BaseResponse( | ||
message = "캣스기답변", | ||
data = aiService.handleRequest(chatMessageDto, userId).message | ||
) | ||
} | ||
|
||
} |
This file contains 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