You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we noticed a discrepancy in token usage between the values retrieved using custom http client and the token usage reported in the agent's chat response.
Preproducing Steps:
Create a Kernel Object
Import Lights plugin to kernel and set ToolCallBehavior to AutoInvoke
Prompt to turn on the lamp.
Note the token usage from function result.
After 4th step, pass custom http client handler to kernel object and parse the response object and track the token usage from response body.
On Analysis it look like , the Token Usage available in kernel object is only showing the usage of last LLM calls. Token usage of tool calls are not captured properly.
we noticed a discrepancy in token usage between the values retrieved using custom http client and the token usage reported in the agent's chat response.
Preproducing Steps:
On Analysis it look like , the Token Usage available in kernel object is only showing the usage of last LLM calls. Token usage of tool calls are not captured properly.
Sample code is added to https://github.com/CodePlacer/Semantic-Kernel/tree/main/TokenDiff
The text was updated successfully, but these errors were encountered: