Skip to content

Commit 510d51a

Browse files
andiveloperilayaperumalg
authored andcommitted
Azure OpenAI: add logprobs to ChatGenerationMetadata
Signed-off-by: Andreas Köninger <[email protected]>
1 parent 3c13b43 commit 510d51a

File tree

2 files changed

+432
-4
lines changed

2 files changed

+432
-4
lines changed

models/spring-ai-azure-openai/src/main/java/org/springframework/ai/azure/openai/AzureOpenAiChatModel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ private ChatGenerationMetadata generateChoiceMetadata(ChatChoice choice) {
565565
return ChatGenerationMetadata.builder()
566566
.finishReason(String.valueOf(choice.getFinishReason()))
567567
.metadata("contentFilterResults", choice.getContentFilterResults())
568+
.metadata("logprobs", choice.getLogprobs())
568569
.build();
569570
}
570571

0 commit comments

Comments
 (0)