[MS] Track Your Token Usage and Costs with Semantic Kernel - devamazonaws.blogspot.com



- SK.Connectors.OpenAI.PromptTokens - number of prompt tokens used.
- SK.Connectors.OpenAI.CompletionTokens - number of completion tokens used.
- SK.Connectors.OpenAI.TotalTokens - total number of tokens used.
Benefits of logging and metering with Semantic Kernel
Logging and metering your requests with Semantic Kernel have several key benefits:- You can easily keep track of your API usage and costs, as each token corresponds to a unit of billing. You can also compare the token usage across different models and parameters to find the optimal settings for your use case.
- You can troubleshoot any issues or errors that may occur during your requests, as each request is logged with its prompt, completion, and token count. You can also use the logs to analyze the performance and quality of your completions.
- You can leverage the power and flexibility of Semantic Kernel to orchestrate your requests with other AI services or plugins, while still having full visibility and control over your token usage.
Next Steps
- Try out Semantic Kernel by visiting our Github repo. Don’t forget to support our project by star’ing our repo.
- You can also check out our documentation for more examples and tutorials on how to use Semantic Kernel.
- Join our community to contribute or if you have question.
Post Updated on August 30, 2023 at 05:52PM
Thanks for reading
from devamazonaws.blogspot.com
Comments
Post a Comment