Calculate token usage in Python SDK #8702
-
Hello Team, Is there direct method available in Semantic Kernel to calculate the tokens - Prompt Tokens and Completions tokens. Please suggest various ways to calculate token in Python SDK |
Beta Was this translation helpful? Give feedback.
Answered by
evchaki
Sep 16, 2024
Replies: 1 comment
-
@nehalakhani - this is in the metadata in the function result. You can store the metadata and do something with that (prompt tokens and comp tokens). |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sophialagerkranspandey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@nehalakhani - this is in the metadata in the function result. You can store the metadata and do something with that (prompt tokens and comp tokens).