-
Notifications
You must be signed in to change notification settings - Fork 49
Added AgenticServices helper #835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added AgenticServices helper #835
Conversation
2401aa7
to
61bd518
Compare
.outputName("story") | ||
.build()); | ||
spy( | ||
dev.langchain4j.agentic.AgenticServices.agentBuilder(CreativeWriter.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop the FQCN
} | ||
} | ||
|
||
private static class AgentInvocationHandler implements InvocationHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already have something pretty similar on the agentic-langchain4j
module. Is it doable to share the same class?
21fa658
to
bfec4eb
Compare
experimental/lambda/src/main/java/io/serverlessworkflow/impl/executors/func/JavaFuncUtils.java
Outdated
Show resolved
Hide resolved
...mental/lambda/src/main/java/io/serverlessworkflow/impl/expressions/func/HasAgenticScope.java
Outdated
Show resolved
Hide resolved
bfec4eb
to
18e031d
Compare
Signed-off-by: Dmitrii Tikhomirov <chani.liet@gmail.com>
18e031d
to
0089734
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's getting pretty neat!
CreativeWriter creativeWriter = | ||
spy( | ||
AgenticServices.agentBuilder(CreativeWriter.class) | ||
dev.langchain4j.agentic.AgenticServices.agentBuilder(CreativeWriter.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the FQCN
...chain4j/src/test/java/io/serverlessworkflow/fluent/agentic/langchain4j/WorkflowAgentsIT.java
Outdated
Show resolved
Hide resolved
AgentsUtils.NovelCreator novelCreator = | ||
io.serverlessworkflow.fluent.agentic.AgenticServices.of(AgentsUtils.NovelCreator.class) | ||
.flow(workflow("seqFlow").agent(creativeWriter).sequence(audienceEditor, styleEditor)) | ||
.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This DSL is looking pretty cool. We should do the same for FuncWorkflowBuilder
, which is the one we are using on quarkus-flow
next.
...chain4j/src/test/java/io/serverlessworkflow/fluent/agentic/langchain4j/WorkflowAgentsIT.java
Show resolved
Hide resolved
...ental/fluent/agentic/src/main/java/io/serverlessworkflow/fluent/agentic/AgenticWorkflow.java
Show resolved
Hide resolved
Signed-off-by: Dmitrii Tikhomirov <chani.liet@gmail.com>
e521094
to
e23c225
Compare
No description provided.