Codeunit 7759 AOAI Token

System Application, System.AI

Source AL, 68 lines

src/System Application/App/AI/src/Azure OpenAI/AOAIToken.Codeunit.allines 6 to 21 of 68, Copyright (c) Microsoft Corporation. MIT

codeunit 7759 "AOAI Token"{    InherentEntitlements = X;    InherentPermissions = X;    Access = Public;    var        AzureOpenAIImpl: Codeunit "Azure OpenAI Impl";        Encodingcl100kbaseLbl: Label 'cl100k_base', Locked = true;        Encodingp50kbaseLbl: Label 'p50k_base', Locked = true;    /// <summary>    /// Gets the token count for the input according to GPT3.5 models.    /// </summary>    /// <param name="Input">The input to get the token count for.</param>    /// <returns>The token count.</returns>

All 68 lines

Public procedures 5 in 29

GetGPT35TokenCount(Input: SecretText): Integernew in 24
GetGPT4TokenCount(Input: SecretText): Integernew in 24
GetAdaTokenCount(Input: SecretText): Integernew in 24
GetDavinciTokenCount(Input: SecretText): Integernew in 24
GetTotalServerSessionTokensConsumed(): Integernew in 26

Changes 1 in 26

List17181920212223242526272829
Procedures1
GetTotalServerSessionTokensConsumed(): Integernew in 26
added

All 1 changes in 24-29