Skip to content

Commit 9945528

Browse files
committed
Fix list error
1 parent 09f6b4c commit 9945528

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dd-trace-api/src/test/java/datadog/trace/api/llmobs/LLMObsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import datadog.trace.api.llmobs.noop.NoOpLLMObsSpanFactory;
1515
import java.lang.reflect.Field;
1616
import java.util.Arrays;
17+
import java.util.Collections;
1718
import java.util.HashMap;
1819
import java.util.List;
1920
import java.util.Map;
@@ -75,7 +76,7 @@ void testLLMMessageCreationWithToolCalls() {
7576
Map<String, Object> args = new HashMap<>();
7677
args.put("location", "Paris");
7778
LLMObs.ToolCall toolCall = LLMObs.ToolCall.from("get_weather", "function", "tool-123", args);
78-
List<LLMObs.ToolCall> toolCalls = List.of(toolCall);
79+
List<LLMObs.ToolCall> toolCalls = Collections.singletonList(toolCall);
7980

8081
LLMObs.LLMMessage message =
8182
LLMObs.LLMMessage.from("assistant", "Let me check the weather", toolCalls);

0 commit comments

Comments
 (0)