This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.25k
stars
1.93k
forks
source link
[OpenAI] Support token calculation in streaming API #40791
OpenAI starts to support stream_options in the chat completion API.
We should look into how to support it in Azure OpenAI SDK for Java.
curl payload looks like below, it includes the "usage":{"prompt_tokens":11,"completion_tokens":60,"total_tokens":71}