-
-
Notifications
You must be signed in to change notification settings - Fork 8
OpenAI.TokenEngine
Andrew Lambert edited this page Jun 1, 2024
·
4 revisions
OpenAI.TokenEngine
Protected Class TokenEngine
This class represents the tokens of an API response. Not all endpoints provide token information.
This example gets the first token of the response and its probability.
Dim reply As OpenAI.ChatCompletion = OpenAI.ChatCompletion.Create(chatlog, "user", "Who won the world series in 2020?")
Dim token As String = chat.Tokens.Token(0)
Dim probability As Double = chat.Tokens.Probability(0)
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2023-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.