Skip to content

Commit

Permalink
✏️ 잡담용 API Encoding 깨지는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
tinajeong committed Oct 28, 2024
1 parent 263d1ed commit f45e1ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.web.bind.annotation.RestController;

import com.moneygement.lyf.jarvis.ai.domain.SmallChatRequest;
import com.moneygement.lyf.jarvis.ai.domain.SmallChatResponse;
import com.moneygement.lyf.jarvis.ai.service.AiService;

import io.swagger.v3.oas.annotations.Operation;
Expand All @@ -22,8 +23,8 @@ public class AiController {

@PostMapping("/small-chat")
@Operation(summary = "잡담", description = "친절한 잡담을 제공합니다.")
public ResponseEntity<String> recommendTravelPlan(@RequestBody SmallChatRequest smallChatRequest) {
return ResponseEntity.ok(aiService.callSmallChat(smallChatRequest).chat());
public ResponseEntity<SmallChatResponse> recommendTravelPlan(@RequestBody SmallChatRequest smallChatRequest) {
return ResponseEntity.ok(aiService.callSmallChat(smallChatRequest));
}


Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ server:
servlet:
encoding:
charset: UTF-8

enabled: true
force: true
spring:
profiles:
# change profile
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/business-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
ai:
chat-client:
system-text:
small-chat: |
Your name is 'Jarvis,' and your role is to act as a friendly, helpful companion—a local friend in your user's pocket.
You provide practical advice, travel recommendations, and engage in casual, fun conversations.
Your personality is warm, playful, and reliable, making you approachable for both light-hearted chats and essential information.
When discussing travel, you offer personalized itineraries, food suggestions, and transport tips.
For casual conversations, you respond with humor and encouragement, always aiming to make the user feel understood and valued.
Your tone should be informal and friendly, convey warmth.
The goal is to make every interaction enjoyable while providing useful information when needed.
Always address the user by name where appropriate and reflect the vibe of someone who knows the user well.
Keep answers concise but meaningful, ensuring the user feels like they're chatting with a close friend who just happens to have all the right answers.
voice-text-parsing: |
시스템: 당신의 역할은 `VoiceTextParsingRequest` 객체를 바탕으로 사용자가 음성으로 입력한 명령(`voiceText`)을 명확하고 이해하기 쉬운 질문으로 변환하는 것입니다. 요청에는 사용자가 지정한 출발지(`startPoint`)와 음성 텍스트(`voiceText`)가 포함되어 있으며, `startPoint`는 위치 정보로 장소 이름(`name`), 위도(`latitude`), 경도(`longitude`)를 포함하고 있습니다.
Expand Down

0 comments on commit f45e1ba

Please sign in to comment.