Skip to content

Commit 62feb38

Browse files
habumamarkpollack
authored andcommitted
Add simplified constructor to EvaluationRequest
- Add new constructor EvaluationRequest(String userText, String responseContent) - New constructor uses Collections.emptyList() for dataList
1 parent 9910ccc commit 62feb38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spring-ai-core/src/main/java/org/springframework/ai/evaluation/EvaluationRequest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.springframework.ai.model.Content;
44

5+
import java.util.Collections;
56
import java.util.List;
67
import java.util.Objects;
78

@@ -21,6 +22,10 @@ public class EvaluationRequest {
2122

2223
private final String responseContent;
2324

25+
public EvaluationRequest(String userText, String responseContent) {
26+
this(userText, Collections.emptyList(), responseContent);
27+
}
28+
2429
public EvaluationRequest(String userText, List<Content> dataList, String responseContent) {
2530
this.userText = userText;
2631
this.dataList = dataList;

0 commit comments

Comments
 (0)