Skip to content
This repository was archived by the owner on Feb 28, 2026. It is now read-only.

OpenAI.TokenEngine.Count

Andrew Lambert edited this page Jun 1, 2024 · 2 revisions

Property declaration

Dim Count As Integer ' read-only

Remarks

This property contains the number of tokens in the response, if that information is available.

Example

 Dim reply As OpenAI.ChatCompletion = OpenAI.ChatCompletion.Create(chatlog, "user", "Who won the world series in 2020?")
 Dim tokencount As Integer = reply.Tokens.Count

Clone this wiki locally