Codeunit 6195 E-Doc. AI Tool Processor

E-Document Core, Microsoft.eServices.EDocument.Processing.AI

src/Apps/W1/EDocument/App/src/Processing/AI/EDocAIToolProcessor.Codeunit.al10 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

Setup line 41

  1. 49callsRegisterCapabilityIfNeeded
  2. 51callsCodeunit 7773 Copilot Capability IsCapabilityRegistered
  3. 53callsCodeunit 7773 Copilot Capability IsCapabilityActive
  4. 57callsGetChatCompletionsDeployment
  5. 58callsCodeunit 7771 Azure OpenAI SetAuthorization
  6. 59callsCodeunit 7771 Azure OpenAI SetCopilotCapability
  7. 62callsCodeunit 7761 AOAI Chat Completion Params SetMaxTokens
  8. 62callsGetDefaultMaxOutputTokens
  9. 63callsCodeunit 7761 AOAI Chat Completion Params SetTemperature
  10. 63callsGetDefaultTemperature
  11. 67callsSetupChatMessages
  12. 71callsGetDefaultMaxOutputTokens
  13. 72callsGetDefaultTemperature
  14. 74callsLogFeatureUptake

Process line 84

  1. 98callsCodeunit 7763 AOAI Chat Messages AddUserMessage
  2. 99callsCodeunit 7759 AOAI Token GetGPT4TokenCount
  3. 101callsGetDefaultMaxInputTokens
  4. 102callsLogError
  5. 102callsGetDefaultMaxInputTokens
  6. 108callsCodeunit 7771 Azure OpenAI GenerateChatCompletion
  7. 112callsHandleResponse
  8. 114callsLogResult

SetupChatMessages line 119, local

  1. 127callsCodeunit 9176 User Settings GetUserSettings
  2. 128callsCodeunit 43 Language GetWindowsLanguageName
  3. 131callsCodeunit 7763 AOAI Chat Messages SetPrimarySystemMessage
  4. 135callsCodeunit 7763 AOAI Chat Messages AddTool
  5. 137callsCodeunit 7763 AOAI Chat Messages SetToolChoice

HandleResponse line 149, local

  1. 155callsCodeunit 7770 AOAI Operation Response IsSuccess
  2. 156callsLogError
  3. 156callsCodeunit 7770 AOAI Operation Response GetStatusCode
  4. 156callsCodeunit 7770 AOAI Operation Response GetError
  5. 160callsCodeunit 7770 AOAI Operation Response GetResult
  6. 161callsLogError
  7. 165callsCodeunit 7770 AOAI Operation Response IsFunctionCall
  8. 166callsHandleFunctionCalls
  9. 168callsCodeunit 7770 AOAI Operation Response GetResult

HandleFunctionCalls line 172, local

  1. 182callsCodeunit 7770 AOAI Operation Response GetFunctionResponses
  2. 184callsCodeunit 7770 AOAI Operation Response GetFunctionResponses
  3. 185callsCodeunit 7758 AOAI Function Response IsSuccess
  4. 189callsCodeunit 7758 AOAI Function Response GetFunctionName
  5. 192callsCodeunit 7758 AOAI Function Response GetFunctionName
  6. 193callsLogError
  7. 193callsCodeunit 7758 AOAI Function Response GetFunctionName
  8. 199callsLogError

LogFeatureUptake line 204, local

  1. 206callsCodeunit 8703 Feature Telemetry LogUptake
  2. 207callsCodeunit 8703 Feature Telemetry LogUptake

LogResult line 210, local

  1. 213callsCodeunit 8703 Feature Telemetry LogUsage
  2. 215callsCodeunit 8703 Feature Telemetry LogError

LogError line 218, local

  1. 220callsCodeunit 8703 Feature Telemetry LogError

RegisterCapabilityIfNeeded line 223, local

  1. 229callsCodeunit 457 Environment Information IsSaaSInfrastructure
  2. 231callsCodeunit 7773 Copilot Capability IsCapabilityRegistered
  3. 232callsCodeunit 7773 Copilot Capability RegisterCapability

GetChatCompletionsDeployment line 250, internal

  1. 257callsCodeunit 2200 Azure Key Vault GetAzureKeyVaultSecret
  2. 264callsCodeunit 7768 AOAI Deployments GetGPT56CeresLatest
  3. 266callsCodeunit 7768 AOAI Deployments GetGPT41Latest
  4. 269callsCodeunit 7768 AOAI Deployments GetGPT56CeresPreview
  5. 271callsCodeunit 7768 AOAI Deployments GetGPT41MiniPreview
  6. 273callsCodeunit 7768 AOAI Deployments GetGPT41Latest