codeunitCopilot & Agentsofficial - Microsoftderived - from the source, no model text

Codeunit 7759 "AOAI Token"

System Application · System.AI

Across versions

  1. BC23not present
  2. BC24added
  3. BC25unchanged
  4. BC261 procedures added
  5. BC27-30unchanged

Neighbourhood 4 connected objects and pages

Codeunit 7772 "Azure OpenAI Impl" (calls, 6 links)Azure OpenAI ImplCodeunit 7250 "Bank Rec. AI Matching Impl." (calls, 2 links)Bank Rec. AI Matching Impl.Codeunit 324 "No. Series Copilot Impl." (calls)No. Series Copilot Impl.Codeunit 7764 "AOAI Chat Messages Impl" (calls)AOAI Chat Messages Impl

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

System Application · System.AI · BC24-30 · source at ea08af5e · facts from BC29

Properties

Property Value
Access Public

Procedures

  • GetGPT35TokenCount(Input: SecretText): Integer: Gets the token count for the input according to GPT3.5 models.
  • GetGPT4TokenCount(Input: SecretText): Integer: Gets the token count for the input according to GPT4 models.
  • GetAdaTokenCount(Input: SecretText): Integer: Gets the token count for the input according to embedding Ada models.
  • GetDavinciTokenCount(Input: SecretText): Integer: Gets the token count for the input according to text Davinci models.
  • GetTotalServerSessionTokensConsumed(): Integer + BC26: Gets the total tokens used till now for the server session. The total tokens used is aggregated for all the models. Note: this method is expected to change in future.

Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Called by

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "AOAI Token"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources