Skip to content

Commit

Permalink
add o1 unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lambdua committed Sep 19, 2024
1 parent 5ec8a82 commit c60073c
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -957,4 +957,18 @@ void toolCallingStrictTest(){
assertEquals("asc",arguments.get("order_by").asText());
}

@Test
void o1ModelTest(){
ChatCompletionRequest chatCompletionRequest = ChatCompletionRequest.builder()
.model("o1-mini")
.messages(Arrays.asList(new UserMessage("9.11和9.8比较,那个大")))
.build();
ChatCompletionResult chatCompletion = service.createChatCompletion(chatCompletionRequest);
assertNotNull(chatCompletion);
assertNotNull(chatCompletion.getChoices());
ChatCompletionChoice choice = chatCompletion.getChoices().get(0);
assertNotNull(choice);
assertNotNull(choice.getMessage());
assertNotNull(choice.getMessage().getContent());
}
}

0 comments on commit c60073c

Please sign in to comment.