Skip to content

Commit

Permalink
fix: prompt 값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
koosco committed Dec 7, 2024
1 parent ad207cd commit 97ed5ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/com/groom/orbit/ai/app/openai/OpenAiService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Stream;

import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.chat.model.ChatResponse;
Expand Down Expand Up @@ -88,7 +90,13 @@ public RecommendGoalListResponseDto recommendGoal(Long memberId) {
"goalList",
String.join(
PARAMETER_LIST_DELIMITER,
othersVector.stream().flatMap(vector -> vector.goals().stream()).toList()),
othersVector.stream()
.filter(Objects::nonNull)
.flatMap(
vector ->
vector.goals() != null ? vector.goals().stream() : Stream.empty())
.filter(Objects::nonNull)
.toList()),
"format",
format));
return converter.convert(response);
Expand Down

0 comments on commit 97ed5ea

Please sign in to comment.