🔗Response

C4AI SDK - EES Raw Request Execution Result

The C4AI_SDK_TYPES__EES_RawRequestExecutionResult type represents the detailed information regarding the execution of a request within the Cloud4.ai system.

Property
Type
Description

id

string

The unique identifier of the request.

status

string

The status of the request.

mode

'play' | 'real'

The mode of the request, indicating whether it was played or executed in real-time.

start

string

The start time of the request.

end

string | undefined

The end time of the request. If the request is not completed, this field will be empty.

duration

number

The duration of the request, calculated as the difference between the end and start time.

command

string

The name of the command that was executed.

service

string

The SIC (Service Identifier Code) of the service that was executed.

user

string | undefined

The user SIC that executed the request.

api

string | undefined

The API SIC that was used to execute the command.

organization

string

The organization SIC that was used to execute the command.

meta

any | undefined

The metadata of the request, containing additional information in JSON format.

result

The result of the request.

error

The error of the request. If the request was successful, this field will be empty.

createdAt

string

The time when the request was created in the system.

Example

❗️Note: The same response object will be passed to callback in case it provided

const exampleResult: C4AI_CommandRequest = {
  rawResult: {
    id: 'c4ai-cr::04b3735e-22ec-4de2-b5fa-ff9cc1f40048',
    status: 'COMPLETED',
    mode: 'real',
    command: 'EXECUTE',
    service: 'sic@0000000001:aac-instance:0000000001',
    result: {
      result: 'My neck can be up to 6 feet long, making it the longest neck of any land animal!',
      payload: [Object]
    },
    api: 'sic@0000000001:api-credentials:0000000019',
    organization: 'sic@0000000000:organization:0000000001',
    duration: 1,
    start: '2024-04-30T23:16:54.746Z',
    end: '2024-04-30T23:16:56.264Z',
    createdAt: 'Tue Apr 30 2024 23:16:56 GMT+0000'
  }
};

C4AI SDK - API Provider Error

The C4AI_SDK_TYPES__APIProviderError type represents an error that may occur during the execution of a request within the Cloud4.ai system.

Property
Type
Description

name

string

The name of the error.

code

string

The error code.

description

string | undefined

An optional description providing more details about the error.

message

string

The error message.

Example

const exampleError: C4AI_SDK_TYPES__APIProviderError = {
  code: 'C4AI_INT_SDK_API_ERROR__EES__0001',
  name: 'Executor service is not active',
  message: 'Executor service is not active',
  description: 'Please make sure that the service status is Active and the services are available to receive commands.',
};

This example demonstrates an instance of the C4AI_SDK_TYPES__APIProviderError containing details of an error encountered during the execution of a request. Actual data is anonymized for confidentiality purposes.

C4AI SDK - AAC Execute Command API Result

The C4AI_SDK_TYPES__AAC_ExecuteCommandAPIResult type represents the result of executing a command through the AAC (AI API Connector) service within the Cloud4.ai system.

Property
Type
Description

result

any

The result of the command execution.

payload

C4AI_SDK_Dictionary<any> | undefined

An optional payload containing additional data specific to the AAC provider.

Example:

const exampleResult: C4AI_SDK_TYPES__AAC_ExecuteCommandAPIResult = {
  result: 'Success',
  payload: {
    confidence: 0.85,
    entities: ['apple', 'orange', 'banana'],
  }
};

This example demonstrates an instance of the C4AI_SDK_TYPES__AAC_ExecuteCommandAPIResult type containing the result of a command execution through the AAC service. Actual data may vary depending on the specific AAC provider.

Last updated