⭐Request


To interact with the Cloud4.ai system, the SDK offers a convenient wrapper around all C4AI Services. Serving as the primary entry point, the Elastic Endpoint Service (EES) streamlines the process of defining Command Requests, complete with options and scheduling capabilities, thereby facilitating control over throttling, retries, and other critical integration aspects.

Note: Delve deeper into EES configurations, options, and features in the EES (Elastic Endpoint) section.

Configurations

Simple Request

Using the SDK's EES class, you can seamlessly dispatch any executable command for execution. Here's an example:

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!')
        )
    })
});

Nested Injections

By leveraging the request syntax, you can define additional strategies for parameter retrieval. This allows you to specify parameters at various depths within the commands included in the original request. Consider the following example:

Upon making a request, the response will always return a Command Request Type. For instance:


This version maintains the original information while adding clarification and detail for better understanding.

Last updated

Was this helpful?