Skip to content

Commit dd275d4

Browse files
committed
Update agent api
1 parent afee6c5 commit dd275d4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<properties>
2020
<java.version>21</java.version>
21-
<embabel-agent.version>0.3.3</embabel-agent.version>
21+
<embabel-agent.version>0.3.4</embabel-agent.version>
2222
</properties>
2323

2424
<dependencies>

src/main/java/com/embabel/template/agent/WriteAndReviewAgent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ Story craftStory(UserInput userInput, Ai ai) {
140140
.withTemperature(.7)
141141
)
142142
.withPromptContributor(Personas.WRITER)
143-
.createObject(String.format("""
143+
.creating(Story.class)
144+
.fromPrompt(String.format("""
144145
Craft a short story in %d words or less.
145146
The story should be engaging and imaginative.
146147
Use the user's input as inspiration if possible.
@@ -151,6 +152,6 @@ Story craftStory(UserInput userInput, Ai ai) {
151152
""",
152153
storyWordCount,
153154
userInput.getContent()
154-
).trim(), Story.class);
155+
).trim());
155156
}
156157
}

0 commit comments

Comments
 (0)