Codeunit 7772 Azure OpenAI Impl

System Application, System.AI

src/System Application/App/AI/src/Azure OpenAI/AzureOpenAIImpl.Codeunit.al28 procedures and triggers, in source order. Copyright (c) Microsoft Corporation. MIT

IsEnabled line 66

  1. 68callsCodeunit 7774 Copilot Capability Impl IsCapabilityEnabled

IsEnabled line 71

  1. 73callsCodeunit 7774 Copilot Capability Impl IsCapabilityEnabled

SetCopilotCapability line 76

  1. 78callsCodeunit 7774 Copilot Capability Impl SetCopilotCapability

IsAuthorizationConfigured line 81

  1. 85callsCodeunit 7767 AOAI Authorization IsConfigured
  2. 87callsCodeunit 7767 AOAI Authorization IsConfigured
  3. 89callsCodeunit 7767 AOAI Authorization IsConfigured

IsInitialized line 95

  1. 97callsIsEnabled
  2. 97callsIsAuthorizationConfigured

GetFastPrompt line 101

  1. 112callsCodeunit 7774 Copilot Capability Impl CheckCapabilitySet
  2. 113callsCodeunit 7774 Copilot Capability Impl CheckEnabled
  3. 115callsCheckAuthorizationEnabled
  4. 116callsCodeunit 7774 Copilot Capability Impl AddTelemetryCustomDimensions
  5. 118callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  6. 120callsCodeunit 7767 AOAI Authorization GetManagedResourceDeployment
  7. 126callsCodeunit 7774 Copilot Capability Impl GetCapabilityName
  8. 135callsCodeunit 7789 AOAI Fast Prompt Response Set
  9. 138callsCodeunit 8703 Feature Telemetry LogError
  10. 138callsGetAzureOpenAICategory
  11. 142callsCodeunit 7789 AOAI Fast Prompt Response Set
  12. 144callsCodeunit 7789 AOAI Fast Prompt Response IsFastPrompt
  13. 144callsCodeunit 7789 AOAI Fast Prompt Response GetTemplate
  14. 145callsCodeunit 8703 Feature Telemetry LogUsage
  15. 145callsGetAzureOpenAICategory

SetAuthorization line 152

  1. 156callsCodeunit 7767 AOAI Authorization SetFirstPartyAuthorization
  2. 158callsCodeunit 7767 AOAI Authorization SetFirstPartyAuthorization
  3. 160callsCodeunit 7767 AOAI Authorization SetFirstPartyAuthorization

SetAuthorization line 167

  1. 171callsCodeunit 7767 AOAI Authorization SetSelfManagedAuthorization
  2. 173callsCodeunit 7767 AOAI Authorization SetSelfManagedAuthorization
  3. 175callsCodeunit 7767 AOAI Authorization SetSelfManagedAuthorization

SetManagedResourceAuthorization line 183

  1. 187callsCodeunit 7767 AOAI Authorization SetMicrosoftManagedAuthorization
  2. 189callsCodeunit 7767 AOAI Authorization SetMicrosoftManagedAuthorization
  3. 191callsCodeunit 7767 AOAI Authorization SetMicrosoftManagedAuthorization

SetManagedResourceAuthorization line 209

  1. 213callsCodeunit 7767 AOAI Authorization SetMicrosoftManagedAuthorization
  2. 215callsCodeunit 7767 AOAI Authorization SetMicrosoftManagedAuthorization
  3. 217callsCodeunit 7767 AOAI Authorization SetMicrosoftManagedAuthorization

GenerateTextCompletion line 226

  1. 230callsGetTextMetaprompt

GenerateTextCompletion line 234

  1. 236callsGetTextMetaprompt

GenerateTextCompletion line 248

  1. 255callsGuiCheck
  2. 257callsCodeunit 7774 Copilot Capability Impl CheckCapabilitySet
  3. 258callsCodeunit 7774 Copilot Capability Impl CheckEnabled
  4. 259callsCheckAuthorizationEnabled
  5. 261callsCodeunit 7774 Copilot Capability Impl AddTelemetryCustomDimensions
  6. 262callsCheckTextCompletionMetaprompt
  7. 265callsRemoveProhibitedCharacters
  8. 267callsCodeunit 7765 AOAI Text Completion Params AddCompletionsParametersToPayload
  9. 271callsSendTokenCountTelemetry
  10. 271callsCodeunit 7759 AOAI Token GetGPT4TokenCount
  11. 271callsCodeunit 7759 AOAI Token GetGPT4TokenCount
  12. 273callsSendRequest
  13. 274callsCodeunit 8703 Feature Telemetry LogError
  14. 274callsGetAzureOpenAICategory
  15. 278callsCodeunit 8703 Feature Telemetry LogUsage
  16. 278callsGetAzureOpenAICategory
  17. 279callsCodeunit 7770 AOAI Operation Response GetResult

GenerateEmbeddings line 285

  1. 291callsGuiCheck
  2. 293callsCodeunit 7774 Copilot Capability Impl CheckCapabilitySet
  3. 294callsCodeunit 7774 Copilot Capability Impl CheckEnabled
  4. 295callsCheckAuthorizationEnabled
  5. 300callsCodeunit 7774 Copilot Capability Impl AddTelemetryCustomDimensions
  6. 301callsSendTokenCountTelemetry
  7. 301callsCodeunit 7759 AOAI Token GetAdaTokenCount
  8. 302callsSendRequest
  9. 303callsCodeunit 8703 Feature Telemetry LogError
  10. 303callsGetAzureOpenAICategory
  11. 307callsCodeunit 8703 Feature Telemetry LogUsage
  12. 307callsGetAzureOpenAICategory
  13. 308callsProcessEmbeddingResponse

ProcessEmbeddingResponse line 312, local

  1. 319callsCodeunit 7770 AOAI Operation Response GetResult

GenerateChatCompletion line 336

  1. 348callsGuiCheck
  2. 350callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  3. 352callsCodeunit 7763 AOAI Chat Messages CheckCompatibilityWithModel
  4. 352callsCodeunit 7767 AOAI Authorization GetManagedResourceDeployment
  5. 353callsCodeunit 7774 Copilot Capability Impl CheckCapabilitySet
  6. 354callsCodeunit 7774 Copilot Capability Impl CheckEnabled
  7. 355callsCheckAuthorizationEnabled
  8. 356callsCodeunit 7774 Copilot Capability Impl AddTelemetryCustomDimensions
  9. 358callsCodeunit 7761 AOAI Chat Completion Params AddChatCompletionsParametersToPayload
  10. 360callsCodeunit 7761 AOAI Chat Completion Params GetAOAIPolicyParams
  11. 361callsCodeunit 7787 AOAI Policy Params IsDefaultPolicy
  12. 363callsCodeunit 7787 AOAI Policy Params GetAOAIPolicy
  13. 365callsCodeunit 7763 AOAI Chat Messages AssembleHistory
  14. 367callsCodeunit 7763 AOAI Chat Messages ToolsExists
  15. 368callsCodeunit 7763 AOAI Chat Messages AssembleTools
  16. 370callsCodeunit 7763 AOAI Chat Messages GetToolChoice
  17. 379callsCodeunit 8711 Telemetry LogMessage
  18. 382callsCheckJsonModeCompatibility
  19. 386callsSendTokenCountTelemetry
  20. 387callsSendRequest
  21. 388callsCodeunit 8703 Feature Telemetry LogError
  22. 388callsGetAzureOpenAICategory
  23. 392callsProcessChatCompletionResponse
  24. 394callsCodeunit 8703 Feature Telemetry LogUsage
  25. 394callsGetAzureOpenAICategory
  26. 396callsCodeunit 7770 AOAI Operation Response GetFunctionResponses
  27. 396callsCodeunit 7763 AOAI Chat Messages GetToolInvokePreference

ProcessChatCompletionResponse line 428, local

  1. 438callsCodeunit 7770 AOAI Operation Response GetResult
  2. 441callsCodeunit 7763 AOAI Chat Messages AddAssistantMessage
  3. 443callsCodeunit 7763 AOAI Chat Messages AddToolCalls
  4. 445callsProcessToolCalls
  5. 446callsCodeunit 7758 AOAI Function Response SetFunctionCallingResponse
  6. 447callsCodeunit 7770 AOAI Operation Response AddFunctionResponse
  7. 450callsCodeunit 7774 Copilot Capability Impl AddTelemetryCustomDimensions
  8. 451callsCodeunit 7770 AOAI Operation Response GetFunctionResponses
  9. 452callsCodeunit 7758 AOAI Function Response IsSuccess
  10. 453callsCodeunit 8703 Feature Telemetry LogError
  11. 453callsGetAzureOpenAICategory
  12. 453callsCodeunit 7758 AOAI Function Response GetFunctionName
  13. 453callsCodeunit 7758 AOAI Function Response GetError
  14. 453callsCodeunit 7758 AOAI Function Response GetErrorCallstack
  15. 455callsCodeunit 7763 AOAI Chat Messages GetToolInvokePreference
  16. 456callsCodeunit 7770 AOAI Operation Response AppendFunctionResponsesToChatMessages
  17. 458callsCodeunit 8711 Telemetry LogMessage

ProcessToolCalls line 462, local

  1. 476callsProcessFunctionCall

ProcessFunctionCall line 483, local

  1. 512callsCodeunit 7763 AOAI Chat Messages GetFunctionTool
  2. 513callsCodeunit 7763 AOAI Chat Messages GetToolInvokePreference
  3. 514callsTryExecuteFunction
  4. 515callsCodeunit 7758 AOAI Function Response SetFunctionCallingResponse
  5. 516callsCodeunit 7770 AOAI Operation Response AddFunctionResponse
  6. 519callsCodeunit 7758 AOAI Function Response SetFunctionCallingResponse
  7. 520callsCodeunit 7770 AOAI Operation Response AddFunctionResponse
  8. 524callsCodeunit 7758 AOAI Function Response SetFunctionCallingResponse
  9. 525callsCodeunit 7770 AOAI Operation Response AddFunctionResponse
  10. 529callsCodeunit 7758 AOAI Function Response SetFunctionCallingResponse
  11. 530callsCodeunit 7770 AOAI Operation Response AddFunctionResponse

SendRequest line 543, local

  1. 555callsIsBillingTypeAuthorized
  2. 556callsCodeunit 7774 Copilot Capability Impl GetCapabilityName
  3. 556callsCodeunit 7774 Copilot Capability Impl GetCopilotBillingType
  4. 557callsCodeunit 7770 AOAI Operation Response SetOperationResponse
  5. 561callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  6. 563callsCodeunit 7767 AOAI Authorization GetManagedResourceDeployment
  7. 565callsCodeunit 7767 AOAI Authorization GetManagedResourceDeployment
  8. 567callsCodeunit 7767 AOAI Authorization GetEndpoint
  9. 567callsCodeunit 7767 AOAI Authorization GetDeployment
  10. 567callsCodeunit 7767 AOAI Authorization GetApiKey
  11. 570callsCodeunit 7774 Copilot Capability Impl GetCapabilityName
  12. 580callsCodeunit 7770 AOAI Operation Response SetOperationResponse
  13. 587callsCodeunit 7770 AOAI Operation Response SetOperationResponse
  14. 589callsCodeunit 7770 AOAI Operation Response GetStatusCode
  15. 590callsCodeunit 7757 Copilot Notifications CheckAIQuotaAndShowNotification

SendTokenCountTelemetry line 596, local

  1. 598callsCodeunit 8711 Telemetry LogMessage

GuiCheck line 601, local

  1. 605callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  2. 608callsCodeunit 4030 Client Type Management GetCurrentClientType
  3. 611callsCodeunit 7767 AOAI Authorization GetResourceUtilization

CheckAuthorizationEnabled line 615, local

  1. 617callsCodeunit 7767 AOAI Authorization IsConfigured

RemoveProhibitedCharacters line 622

  1. 630callsCodeunit 8711 Telemetry LogMessage

GetTextMetaprompt line 637, internal

  1. 644callsCodeunit 457 Environment Information IsSaaSInfrastructure
  2. 647callsCodeunit 2200 Azure Key Vault GetAzureKeyVaultSecret
  3. 648callsCodeunit 8711 Telemetry LogMessage

CheckTextCompletionMetaprompt line 657, local

  1. 662callsCodeunit 8703 Feature Telemetry LogError
  2. 662callsGetAzureOpenAICategory

CreatePrivacyNoticeRegistrations line 699, local

  1. 702callsGetAzureOpenAICategory
  2. 703callsGetServiceName
  3. 704writesTable 2000000237 Privacy Notice Insert

IsBillingTypeAuthorized line 707

  1. 711callsCodeunit 7774 Copilot Capability Impl GetCopilotBillingType
  2. 712callsCodeunit 7774 Copilot Capability Impl IsPublisherMicrosoft
  3. 713callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  4. 718callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  5. 720callsCodeunit 7767 AOAI Authorization GetResourceUtilization
  6. 724callsCodeunit 7774 Copilot Capability Impl IsProductionEnvironment
  7. 732callsCodeunit 7767 AOAI Authorization GetResourceUtilization