davsclaus commented on code in PR #24485:
URL: https://github.com/apache/camel/pull/24485#discussion_r3534904664
##########
components/camel-ai/camel-langchain4j-agent-api/src/test/java/org/apache/camel/component/langchain4j/agent/api/AgentConfigurationTest.java:
##########
@@ -249,4 +256,97 @@ public void
testWithOutputGuardrailClassesArray_WithInvalidClasses() {
assertNotNull(config.getOutputGuardrailClasses());
assertTrue(config.getOutputGuardrailClasses().isEmpty());
}
+
+ // Tests for tool-calling options
+
+ @Test
+ public void testMaxToolCallingRoundTrips() {
+ AgentConfiguration config = new AgentConfiguration();
+ assertEquals(0, config.getMaxToolCallingRoundTrips());
+
+ AgentConfiguration result = config.withMaxToolCallingRoundTrips(10);
+
+ assertSame(config, result);
+ assertEquals(10, config.getMaxToolCallingRoundTrips());
+ }
Review Comment:
Nit: FQCN usage — the project import style rule requires an `import`
statement rather than inline qualification. Add `import
java.util.function.Function;` to the imports and use the simple name here.
```suggestion
Function<ToolExecutionRequest, ToolExecutionResultMessage> strategy
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]