Skip to content

Commit

Permalink
tweak prompt for more data accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed May 27, 2024
1 parent bbb8d13 commit 434e4c5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ void contextLoads() {
@Test
void chat() {
given().contentType(ContentType.JSON)
.body(new AIChatRequest("How many cricket centuries did Sachin Tendulkar scored ?"))
.body(
new AIChatRequest(
"As a cricketer, how many centuries did Sachin Tendulkar scored adding up both One Day International (ODI) and Test centuries ?"))
.when()
.post("/api/ai/chat")
.then()
Expand All @@ -51,12 +53,12 @@ void chat() {
.body("answer", containsString("100"));

given().contentType(ContentType.JSON)
.body(new AIChatRequest("What is his age ?"))
.body(new AIChatRequest("How many One Day International (ODI) centuries did he scored ?"))
.when()
.post("/api/ai/chat")
.then()
.statusCode(HttpStatus.SC_OK)
.contentType(ContentType.JSON)
.body("answer", containsString("50"));
.body("answer", containsString("49"));
}
}

0 comments on commit 434e4c5

Please sign in to comment.