Codeunit "AOAI Operation Response"
The status and result of an operation.
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
IsSuccess
Check whether the operation was successful.
procedure IsSuccess(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the operation was successful. |
GetStatusCode
Get the status code of the operation.
procedure GetStatusCode(): Integer
Returns
| Type | Description |
|---|---|
| Integer |
The status code of the operation. |
GetResult
Get the result of the operation.
procedure GetResult(): Text
Returns
| Type | Description |
|---|---|
| Text |
The result of the operation. |
GetError
Get the error text of the operation.
procedure GetError(): Text
Returns
| Type | Description |
|---|---|
| Text |
The error text of the operation. |
IsFunctionCall
Get whether the operation was a function call.
procedure IsFunctionCall(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if it was a function call, false otherwise. |
HasFunctionResponsesByName
Get whether there are any function responses for a given function name.
procedure HasFunctionResponsesByName(FunctionName: Text): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| FunctionName | Text |
The case sensitive function name to search for. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if any function responses were found |
TryGetFunctionReponsesByName
Get all the function responses for a specified function name.
procedure TryGetFunctionReponsesByName(FunctionName: Text, var MatchedAOAIFunctionResponses: List of [Codeunit "AOAI Function Response"]): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| FunctionName | Text |
The case sensitive function name to search for. |
| MatchedAOAIFunctionResponses | List of [Codeunit System.AI."AOAI Function Response"] |
The function responses that match the given function name |
Returns
| Type | Description |
|---|---|
| Boolean |
True if any function responses were found |
GetFunctionResponses
procedure GetFunctionResponses(): List of [Codeunit "AOAI Function Response"]
Returns
| Type | Description |
|---|---|
| List of [Codeunit System.AI."AOAI Function Response"] |
AppendFunctionResponsesToChatMessages
Appends all of the successful function results to the provided AOAIChatMessages instance.
procedure AppendFunctionResponsesToChatMessages(var AOAIChatMessages: Codeunit "AOAI Chat Messages")
Parameters
| Name | Type | Description |
|---|---|---|
| AOAIChatMessages | Codeunit System.AI."AOAI Chat Messages" |
The chat messages instance to append the result to. |
Remarks
The last chat message in the history must contain the tool calls from this operation.