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

Codeunit 7763 "AOAI Chat Messages"

System Application · System.AI

Across versions

  1. BC23present
  2. BC2418 procedures added
  3. BC254 procedures added
  4. BC26unchanged
  5. BC271 procedures added
  6. BC284 procedures removed, 3 procedures added
  7. BC29-30unchanged

Neighbourhood 16 connected objects and pages

Codeunit 7764 "AOAI Chat Messages Impl" (calls, 20 links)AOAI Chat Messages ImplCodeunit 7778 "AOAI Tools Impl" (calls, 13 links)AOAI Tools ImplCodeunit 324 "No. Series Copilot Impl." (calls, 10 links)Codeunit 4402 "SOA Output Message Setup" (calls, 10 links)SOA Output Message SetupCodeunit 4399 "SOA Annotation" (calls, 6 links)SOA AnnotationCodeunit 7772 "Azure OpenAI Impl" (calls, 5 links)Azure OpenAI ImplCodeunit 2012 "Entity Text Impl." (calls, 4 links)Entity Text Impl.Codeunit 6331 "Sustainability Chat Completion" (calls, 4 links)Sustainability Chat CompletionCodeunit 7275 "Sales Lines Suggestions Impl." (calls, 4 links)Sales Lines Suggestions Impl.Codeunit 7330 "Item Subst. Suggestion Impl." (calls, 4 links)Item Subst. Suggestion Impl.Codeunit 4417 "SOA Item Selector" (calls, 3 links)Codeunit 4596 "SOA Broader Item Search" (calls, 3 links)SOA Broader Item SearchCodeunit 7251 "Bank Acc. Rec. Trans. to Acc." (calls, 3 links)Bank Acc. Rec. Trans. to Acc.Codeunit 4421 "SOA Attachment MLLM" (calls, 2 links)SOA Attachment MLLMCodeunit 7770 "AOAI Operation Response" (calls, 2 links)AOAI Operation ResponseCodeunit 7758 "AOAI Function Response" (calls)AOAI Function Response

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 · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
Access Public

Procedures

  • SetPrimarySystemMessage(Message: SecretText): Sets the system message which is always at the top of the chat messages history provided to the model.
  • AddSystemMessage(NewMessage: Text): Adds a system message to the chat messages history.
  • AddUserMessage(NewMessage: Text) + BC28 + BC28: Adds a user message to the chat messages history.
  • AddUserMessage(NewMessage: Text; NewName: Text[2048]) + BC28 + BC28: Adds a user message to the chat messages history.
  • AddUserMessage(AOAIUserMessage: Codeunit "AOAI User Message") + BC28 + BC28: Adds a user message with structured content parts to the chat messages history.
  • AddUserMessage(AOAIUserMessage: Codeunit "AOAI User Message"; NewName: Text[2048]) + BC28 + BC28: Adds a user message with structured content parts to the chat messages history.
  • AddAssistantMessage(NewMessage: Text): Adds a assistant message to the chat messages history.
  • AddToolCalls(ToolCalls: JsonArray) + BC25 (internal): Adds a assistant message containing the tool calls returned from the model to the chat messages history.
  • AddToolMessage(ToolCallId: Text; FunctionName: Text; FunctionResult: Text) + BC24: Adds a tool result to the chat messages history.
  • ModifyMessage(Id: Integer; NewMessage: Text; NewRole: Enum "AOAI Chat Roles"; NewName: Text[2048]): Modifies a message in the chat messages history.
  • DeleteMessage(Id: Integer): Deletes a message from the chat messages history.
  • GetHistory(): List of [Text]: Gets the history of chat messages.
  • GetHistoryNames(): List of [Text[2048]]: Gets the history names of chat messages.
  • GetHistoryRoles(): List of [Enum "AOAI Chat Roles"]: Gets the history roles of chat messages.
  • GetLastMessage(): Text: Gets the last chat message.
  • GetLastRole(): Enum "AOAI Chat Roles": Gets the last chat message role.
  • GetLastName(): Text[2048]: Gets the last chat message name.
  • GetLastToolCalls(): JsonArray + BC25: Gets a copy of the last chat message tool calls array.
  • SetHistoryLength(NewLength: Integer): Set the length of history that is used by the model.
  • AssembleHistory(var SystemMessageTokenCount: Integer; var MessagesTokenCount: Integer): JsonArray (internal): Prepares the history of messages to be sent to the deployment model.
  • GetHistoryTokenCount(): Integer + BC24: Gets the number of tokens used by the primary system messages and all other messages.
  • AddTool(Function: Interface "AOAI Function") + BC24 + BC24 − BC28: Adds a function to the payload.
  • DeleteFunctionTool(Name: Text): Boolean + BC24: Deletes a Function from the list of Functions.
  • ClearTools() + BC24: Remove all tools.
  • GetFunctionTool(Name: Text; var Function: Interface "AOAI Function"): Boolean + BC24: Gets the function associated with the specified name.
  • GetFunctionTools(): List of [Text] + BC24: Gets the list of names of Function Tools that have been added.
  • ToolsExists(): Boolean + BC24: Checks if at least one Tools exists in the list.
  • SetAddToolsToPayload(AddToolsToPayload: Boolean) + BC24: Sets the Tools to be added to the payload.
  • SetToolChoice(ToolChoice: Text) + BC24: Sets the Tool choice, which allow model to determine how Tools should be called.
  • SetFunctionAsToolChoice(FunctionName: Text) + BC24 + BC24: Sets the function as the tool choice to be called.
  • SetFunctionAsToolChoice(Function: Interface "AOAI Function") + BC24 + BC24: Sets the function as the tool choice to be called.
  • GetToolChoice(): Text + BC24: Gets the Tool choice parameter.
  • SetToolInvokePreference(AOAIToolInvokePreference: Enum "AOAI Tool Invoke Preference") + BC25: Sets the tool invocation preference, controls how a tool calls response should be handled.
  • GetToolInvokePreference(): Enum "AOAI Tool Invoke Preference" + BC25: Gets the tool invocation preference, controls how a tool calls response should be handled.
  • AddXPIADetectionTags(var Input: Text) + BC27: Adds XPIA Detection tags to an Input text.
  • AssembleTools(): JsonArray + BC24 (internal): Prepares the Tools to be sent to the deployment model.
  • CheckCompatibilityWithModel(Deployment: SecretText) + BC28 (internal): Checks if the current chat messages history is compatible with the deployment model

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 Chat Messages"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources