Skip to content

Commit ab552d2

Browse files
committed
doc: update
1 parent 5465a1a commit ab552d2

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Agentic Patterns
22

3+
Reference implementation of [Agentic Patterns](https://javaaidev.com/docs/agentic-patterns/intro/)
4+
5+
This reference implementation is designed to be reusable.

task-execution/src/main/java/com/javaaidev/agenticpatterns/taskexecution/TaskExecutionAgent.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@
1212
import org.springframework.ai.chat.client.ChatClient.ChatClientRequestSpec;
1313
import org.springframework.core.ParameterizedTypeReference;
1414

15+
/**
16+
* Task Execution Agent, refer to the <a
17+
* href="https://javaaidev.com/docs/agentic-patterns/patterns/task-execution">pattern</a>
18+
*
19+
* @param <Request> Type of task input
20+
* @param <Response> Type of task output
21+
*/
1522
public abstract class TaskExecutionAgent<Request, Response> extends Agent {
1623

24+
/**
25+
* Get the prompt template
26+
*
27+
* @return prompt template
28+
*/
1729
protected abstract String getPromptTemplate();
1830

1931
@Nullable
@@ -27,6 +39,12 @@ protected TaskExecutionAgent(@Nullable Type responseType) {
2739
this.responseType = responseType;
2840
}
2941

42+
/**
43+
* Prepare for the values of variables in the prompt template
44+
*
45+
* @param request Task input
46+
* @return Values of values
47+
*/
3048
@Nullable
3149
protected Map<String, Object> getPromptContext(@Nullable Request request) {
3250
return new HashMap<>();

0 commit comments

Comments
 (0)