diff --git a/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/AgenticWorkflowHelperIT.java b/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/AgenticWorkflowHelperIT.java index a6ca6a5c..69a5cf77 100644 --- a/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/AgenticWorkflowHelperIT.java +++ b/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/AgenticWorkflowHelperIT.java @@ -178,10 +178,11 @@ public void errorHandling() { Map input = Map.of( - "style", "fantasy", + "topic", "fantasy", + "style", "funny", "audience", "young adults"); - Map result; + Map result = null; try (WorkflowApplication app = WorkflowApplication.builder().build()) { result = app.workflowDefinition(wf).instance(input).start().get().asMap().orElseThrow(); } catch (Exception e) { @@ -210,7 +211,7 @@ public void conditionalWorkflow() { conditional(RequestCategory.LEGAL::equals, legalExpert))) .build(); - Map input = Map.of("question", "What is the best treatment for a common cold?"); + Map input = Map.of("request", "What is the best treatment for a common cold?"); Map result; try (WorkflowApplication app = WorkflowApplication.builder().build()) { diff --git a/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/Agents.java b/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/Agents.java index f91dae00..80323ee7 100644 --- a/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/Agents.java +++ b/experimental/fluent/agentic/src/test/java/io/serverlessworkflow/fluent/agentic/Agents.java @@ -15,7 +15,6 @@ */ package io.serverlessworkflow.fluent.agentic; -import dev.langchain4j.agent.tool.Tool; import dev.langchain4j.agentic.Agent; import dev.langchain4j.agentic.internal.AgentSpecification; import dev.langchain4j.agentic.scope.AgenticScopeAccess; @@ -371,7 +370,7 @@ interface MedicalExpert { Analyze the following user request under a medical point of view and provide the best possible answer. The user request is {{it}}. """) - @Tool("A medical expert") + @Agent("A medical expert") String medicalRequest(String request); } @@ -383,7 +382,7 @@ interface LegalExpert { Analyze the following user request under a legal point of view and provide the best possible answer. The user request is {{it}}. """) - @Tool("A legal expert") + @Agent("A legal expert") String legalRequest(String request); } @@ -395,7 +394,7 @@ interface TechnicalExpert { Analyze the following user request under a technical point of view and provide the best possible answer. The user request is {{it}}. """) - @Tool("A technical expert") + @Agent("A technical expert") String technicalRequest(String request); }