Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ public void errorHandling() {

Map<String, Object> input =
Map.of(
"style", "fantasy",
"topic", "fantasy",
"style", "funny",
"audience", "young adults");

Map<String, Object> result;
Map<String, Object> result = null;
try (WorkflowApplication app = WorkflowApplication.builder().build()) {
result = app.workflowDefinition(wf).instance(input).start().get().asMap().orElseThrow();
} catch (Exception e) {
Expand Down Expand Up @@ -210,7 +211,7 @@ public void conditionalWorkflow() {
conditional(RequestCategory.LEGAL::equals, legalExpert)))
.build();

Map<String, Object> input = Map.of("question", "What is the best treatment for a common cold?");
Map<String, Object> input = Map.of("request", "What is the best treatment for a common cold?");

Map<String, Object> result;
try (WorkflowApplication app = WorkflowApplication.builder().build()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand Down