⚙️Configurations & Env Variables
Introduction
To configure, test, and authenticate the C4AI SDK, environment variables are utilized. These variables enable the configuration of logging behavior, authentication, and other parameters crucial for debugging and development purposes.
Environment Variables
Mandatory
Mandatory environment variables are required for the SDK authentication process. If you're passing credentials directly or via the c4ai.conf.json
file, these environment variables will be used in accordance with their priority.
Note: Read more about credentials and configuration priority in the Authentication section.
C4AI_CLIENT_ID
Client ID for Cloud4.ai authentication
C4AI_CLIENT_SECRET
Client secret for Cloud4.ai authentication
Configurable for Development
Using development parameters, you can configure the SDK behavior more effectively for debugging and testing purposes.
C4AI_SDK_CONFIG_VERBOSE
Enable verbose logging (true/false)
C4AI_SDK_CONFIG_IGNORE_ERRORS
true
Ignore errors during SDK execution (true/false)
C4AI_SDK_CONFIG_SDK_VALIDATION
true
Enable SDK validation (true/false)
Configurable for Testing
If you need to run tests, you can additionally configure test environment variables, which can facilitate running tests directly on your services.
Note:
C4AI_SDK_API_LOCATION
may also be utilized in the case of a standalone Cloud4.ai installation.
C4AI_SDK_API_LOCATION
Location of the Cloud4.ai API for testing
C4AI_SDK_TEST__EES_SIC
SIC for EES (Execution Engine Service) tests
C4AI_SDK_TEST__PL_PROMPT_SIC
SIC for PL Prompt tests
C4AI_SDK_TEST__AAC_SIC
SIC for AAC (AI Automation Control) tests
C4AI Config File
The c4ai.conf.json
provides an alternative method to configure the C4AI SDK, allowing you to specify all variables and SDK behavior directly from a JSON configuration. This option is useful in cases where you want to replicate the same behavior in a development environment or for setting up the Frontend SDK.
The structure of the file mirrors that of environment variables:
Note: Test variables are not applicable for the configuration file.
Last updated