File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/test/java/com/embabel/template/agent Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1818
1919 <properties >
2020 <java .version>21</java .version>
21- <embabel-agent .version>0.1.3 </embabel-agent .version>
21+ <embabel-agent .version>0.1.4 </embabel-agent .version>
2222 </properties >
2323
2424 <dependencies >
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ void testWriteAndReviewAgent() {
2020 var agent = new WriteAndReviewAgent (200 , 400 );
2121 agent .craftStory (new UserInput ("Tell me a story about a brave knight" , Instant .now ()), context );
2222
23- String prompt = promptRunner .getLlmInvocations ().getFirst ().getPrompt ();
23+ var prompt = promptRunner .getLlmInvocations ().getFirst ().getMessages (). getFirst (). getContent ();
2424 assertTrue (prompt .contains ("knight" ), "Expected prompt to contain 'knight'" );
2525
2626 }
@@ -34,8 +34,9 @@ void testReview() {
3434 context .expectResponse ("A thrilling tale of bravery and adventure!" );
3535 agent .reviewStory (userInput , story , context );
3636 var llmInvocation = context .getLlmInvocations ().getFirst ();
37- assertTrue (llmInvocation .getPrompt ().contains ("knight" ), "Expected prompt to contain 'knight'" );
38- assertTrue (llmInvocation .getPrompt ().contains ("review" ), "Expected prompt to contain 'review'" );
37+ var prompt = llmInvocation .getMessages ().getFirst ().getContent ();
38+ assertTrue (prompt .contains ("knight" ), "Expected prompt to contain 'knight'" );
39+ assertTrue (prompt .contains ("review" ), "Expected prompt to contain 'review'" );
3940 }
4041
4142}
You can’t perform that action at this time.
0 commit comments