🔶Commands

Certainly! Here's the documentation for the C4AI_EES_Execute_Command:


C4AI_EES_Execute_Command


The C4AI_EES_Execute_Command is a method provided by the Cloud4.ai SDK that allows users to execute commands within the EES (Endpoint Service). This method facilitates the execution of various commands and operations within the Cloud4.ai ecosystem.

Parameters

  • service: The service instance where the command will be executed.

  • command: The command to be executed within the service.

  • options: C4AI_EES_ExecutionOptions Optional execution options such as priority, retries, deduplication ID, callbacks, and fallback commands.

  • schedule: C4AI_EES_ExecutionSchedule Optional execution schedule such as executeIn, executeAt, etc. Read More:

Usage

To use the C4AI_EES_Execute_Command method, ensure you have the Cloud4.ai SDK installed and configured in your project. Import the required modules and initialize the necessary parameters. Here's an example of how to use the method:

const eesSic = process.env.C4AI_SDK_TEST__EES_SIC!;
const aacSic = process.env.C4AI_SDK_TEST__AAC_SIC!;
const promptSic = process.env.C4AI_SDK_TEST__PL_PROMPT_SIC!;

const command = new C4AI_EES.Commands.EXECUTE({
    service: new C4AI_EES(eesSic),
    command: new C4AI_AAC.Commands.EXECUTE({
        service: new C4AI_AAC(aacSic),
        parameters: new C4AI_RequestParameters(
            new C4AI_RequestParameter('prompt', 'Say Hello!'),
        ),
    })
});

C4AI_AAC_Execute_Command


The C4AI_AAC_Execute_Command class is a part of the Cloud4.ai SDK, specifically designed to execute commands within the AAC (AI As Code) service. This class provides a streamlined approach to executing various commands and operations within the AAC service.

Parameters

  • parameters: The request parameters required for the AAC command execution. These parameters define the specific operation to be performed within the AAC service.

  • credentials: Optional API credentials required for authentication and authorization purposes. These credentials are necessary for executing certain commands within the AAC service.

Usage

To use the C4AI_AAC_Execute_Command class, ensure you have the Cloud4.ai SDK installed and configured in your project. Import the required modules and initialize the necessary parameters. Here's an example of how to use the class:

const parameters = new C4AI_RequestParameters(
    // Add your request parameters here
);

const credentials: Array<C4AI_CSS> = [
    // Add your API credentials here
];

const executeCommand = new C4AI_AAC_Execute_Command({
    service: new C4AI_AAC(aacSic),
    parameters,
    credentials,
});

Last updated