Codeunit 7761 "AOAI Chat Completion Params"
System Application · System.AI
Across versions
- BC23present
- BC241 procedures added
- BC25-26unchanged
- BC272 procedures added
- BC28-30unchanged
Neighbourhood 12 connected objects and pages
System Application · System.AI · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Public |
Procedures
GetTemperature(): Decimal: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.GetMaxTokens(): Integer: Gets the maximum number of tokens allowed for the generated answer.GetMaxHistory(): Integer: Gets the maximum number of messages to send back as the message history.GetPresencePenalty(): Decimal: Gets the presence penalty value.GetFrequencyPenalty(): Decimal: Gets the frequency penalty value.GetAOAIPolicyParams(): Codeunit "AOAI Policy Params"+ BC27: Gets the current AOAI policy parameters containing harms severity and XPIA detection settings.SetTemperature(NewTemperature: Decimal): Sets the sampling temperature to use, between 0 and 2. A higher temperature increases the likelihood that the next most probable token will not be selected. When requesting structured data, set the temperature to 0. For human sounding speech, 0.7 is a typical valueSetMaxTokens(NewMaxTokens: Integer): Sets the maximum number of tokens allowed for the generated answer. The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens).SetJsonMode(NewJsonMode: Boolean)+ BC24: Sets if the model should return a valid JSON object as a chat completion.SetMaxHistory(NewMaxHistory: Integer): Sets the maximum number of messages to send back as the message history.SetPresencePenalty(NewPresencePenalty: Decimal): Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics.SetFrequencyPenalty(NewFrequencyPenalty: Decimal): Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.SetAOAIPolicyParams(PolicyParams: Codeunit "AOAI Policy Params")+ BC27: Sets the AOAI policy parameters containing harms severity and XPIA detection settings.AddChatCompletionsParametersToPayload(var Payload: JsonObject)(internal): Adds the Chat Completion parameters to the payload.
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.
- Codeunit 7762 “AOAI Chat Compl Params Impl” (14 calls:
AddChatCompletionsParametersToPayload → AddChatCompletionsParametersToPayload,GetAOAIPolicyParams → GetAOAIPolicyParams,GetFrequencyPenalty → GetFrequencyPenalty, …)
Called by
- Codeunit 324 “No. Series Copilot Impl.” (4 calls:
GenerateNoSeries → SetMaxTokens,GenerateNoSeries → SetTemperature,GenerateNoSeriesUsingToolResult → SetMaxTokens, …) - Codeunit 4402 “SOA Output Message Setup” (4 calls:
AddSignatureToMessageBody → SetMaxTokens,AddSignatureToMessageBody → SetTemperature,CheckMailTemplate → SetMaxTokens, …) - Codeunit 4421 “SOA Attachment MLLM” (3 calls:
TryExtractAttachmentContent → SetJsonMode,TryExtractAttachmentContent → SetMaxTokens,TryExtractAttachmentContent → SetTemperature) - Codeunit 7251 “Bank Acc. Rec. Trans. to Acc.” (3 calls:
GetMostAppropriateGLAccountNos → SetAOAIPolicyParams,GetMostAppropriateGLAccountNos → SetMaxTokens,GetMostAppropriateGLAccountNos → SetTemperature) - Codeunit 2012 “Entity Text Impl.” (2 calls:
GenerateCompletion → SetMaxTokens,GenerateCompletion → SetTemperature) - Codeunit 4417 “SOA Item Selector” (2 calls:
TrySelectBestMatchingItems → SetMaxTokens,TrySelectBestMatchingItems → SetTemperature) - Codeunit 4596 “SOA Broader Item Search” (2 calls:
AICall → SetMaxTokens,AICall → SetTemperature) - Codeunit 6331 “Sustainability Chat Completion” (2 calls:
GenerateChatCompletion → SetMaxTokens,GenerateChatCompletion → SetTemperature) - Codeunit 7275 “Sales Lines Suggestions Impl.” (2 calls:
AICall → SetMaxTokens,AICall → SetTemperature) - Codeunit 7330 “Item Subst. Suggestion Impl.” (2 calls:
AICall → SetMaxTokens,AICall → SetTemperature) - Codeunit 4399 “SOA Annotation” (1 call:
SetAOAIParameters → SetTemperature)
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 Completion Params"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.