Codeunit 6163 E-Doc. PO Copilot Matching

E-Document Core, Microsoft.eServices.EDocument.OrderMatch.Copilot

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

MatchWithCopilot line 38

  1. 45callsCodeunit 8703 Feature Telemetry LogUptake
  2. 45callsFeatureName
  3. 50callsGetSystemPrompt
  4. 54callsApproximateTokenCount
  5. 59callsBuildUserPrompt
  6. 62callsApproximateTokenCount
  7. 62callsApproximateTokenCount
  8. 63callsPromptSizeThreshold
  9. 65callsPreparePrompt
  10. 66callsMatch
  11. 76callsPreparePrompt
  12. 77callsMatch
  13. 84callsGroundCopilotMatching

Match line 105

  1. 114callsFeatureName
  2. 117callsCodeunit 7771 Azure OpenAI SetAuthorization
  3. 117callsCodeunit 7768 AOAI Deployments GetGPT41Latest
  4. 118callsCodeunit 7771 Azure OpenAI SetCopilotCapability
  5. 120callsCodeunit 7761 AOAI Chat Completion Params SetMaxTokens
  6. 120callsMaxTokens
  7. 121callsCodeunit 7761 AOAI Chat Completion Params SetTemperature
  8. 123callsCodeunit 6167 E-Doc. PO AOAI Function SetRecords
  9. 125callsCodeunit 7763 AOAI Chat Messages AddTool
  10. 126callsCodeunit 7763 AOAI Chat Messages SetFunctionAsToolChoice
  11. 126callsCodeunit 6167 E-Doc. PO AOAI Function GetName
  12. 128callsCodeunit 7763 AOAI Chat Messages SetPrimarySystemMessage
  13. 129callsCodeunit 7763 AOAI Chat Messages AddUserMessage
  14. 131callsCodeunit 7771 Azure OpenAI GenerateChatCompletion
  15. 132callsCodeunit 7770 AOAI Operation Response IsSuccess
  16. 133callsFeatureName
  17. 135callsCodeunit 7770 AOAI Operation Response IsFunctionCall
  18. 136callsCodeunit 7770 AOAI Operation Response GetFunctionResponses
  19. 137callsCodeunit 7758 AOAI Function Response IsSuccess
  20. 138callsCodeunit 7758 AOAI Function Response GetResult
  21. 139callsFeatureName
  22. 141callsCodeunit 8703 Feature Telemetry LogError
  23. 141callsFeatureName
  24. 141callsCodeunit 7758 AOAI Function Response GetFunctionName
  25. 143callsCodeunit 8703 Feature Telemetry LogError
  26. 143callsFeatureName
  27. 146callsCodeunit 7770 AOAI Operation Response GetStatusCode
  28. 146callsCodeunit 7770 AOAI Operation Response GetError
  29. 146callsFeatureName

SumUnitCostForAIMatches line 151

  1. 160callsCodeunit 6109 E-Document Import Helper GetCurrencyRoundingPrecision

RegisterAICapability line 167

  1. 172callsCodeunit 457 Environment Information IsSaaSInfrastructure
  2. 175callsCodeunit 7773 Copilot Capability IsCapabilityRegistered
  3. 176callsCodeunit 7773 Copilot Capability RegisterCapability
  4. 177callsCodeunit 8703 Feature Telemetry LogUptake
  5. 177callsFeatureName

GroundCopilotMatching line 190, local

  1. 201callsCodeunit 6164 E-Doc. Line Matching MatchOneToOne
  2. 205writesTable 6163 E-Doc. PO Match Prop. Buffer Modify
  3. 207writesTable 6163 E-Doc. PO Match Prop. Buffer Delete
  4. 209writesTable 6163 E-Doc. PO Match Prop. Buffer Delete

BuildUserPrompt line 214, local

  1. 219callsPotentialMatchingPurchaseOrderLine
  2. 220callsPrepareEDocumentLineStatement
  3. 221callsPreparePurchaseOrderLineStatement

PotentialMatchingPurchaseOrderLine line 226, local

  1. 231callsIsPOLineWithinCostThreshold
  2. 231callsDoesLinesHaveQuantityToMatch
  3. 233writesTable 39 Purchase Line Insert

IsPOLineWithinCostThreshold line 239, local

  1. 241callsCostDifference

GetSystemPrompt line 279, local

  1. 284callsCodeunit 2200 Azure Key Vault GetAzureKeyVaultSecret
  2. 287callsFeatureName

HandleOnRegisterCopilotCapability line 331, local

  1. 333callsRegisterAICapability