-
-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
There are two files that ESBMC-AI uses to store configuration data. The environment file and the config.json
file.
ESBMC-AI uses environment variables to load API keys and other information not stored in the configuration JSON file. There is a template .env.example
file provided that can be used as a starting point for creating the .env
file. The template can be found here. ESBMC-AI uses by default the system's environment files, if any variables are missing, then it checks in other locations. The checks occur as follows:
- System environment variables.
-
.env
file in the current directory, moving upwards in the directory tree. -
esbmc-ai.env
file in the current directory, moving upwards in the directory tree. -
esbmc-ai.env
file in$HOME/.config/
for Linux/macOS and%userprofile%
for Windows.
ESBMC-AI be configured with the following environment variables:
The following variables are accepted:
-
OPENAI_API_KEY
: API key for interacting with OpenAI services. -
HUGGINGFACE_API_KEY
: API key for interacting with Hugging Face services. -
ESBMC_AI_CFG_PATH
: Location of ESBMC AI configuration file. This can be a relative or absolute path to ESBMC-AI JSON config.ESBMC_AI_CFG_PATH
undergoes tilde user expansion and also environment variable expansion.
The config.json
file contains various different config entries for customizing the behavior of ESBMC-AI. Generally, these options are not secret, as compared to the ENV configuration. So, the JSON configuration is shareable. The default configuration state can be found here.
The following section will describe the JSON configuration's acceptable fields and values. The layout of the following subsections will follow a format of levels, where the root object is the topmost level in the configuration.
The root object can contain the following entries:
-
ai_model
: What is the default AI model to use? Valid AI models are built-in AI models and models defined inai_custom
. -
ai_custom
: See AI Custom -
chat_modes
: See Chat Modes
-
esbmc_params
: An array of parameters that will be used by ESBMC in most scenarios (User Chat Mode, Fix Code Mode).
-
allow_successful
: If set to true, ESBMC-AI will not produce an error and exit if the source code does not compile. -
temp_auto_clean
: Should the temp directory be deleted after ESBMC-AI ends? -
loading_hints
: Display nice loading animations while waiting.
-
consecutive_prompt_delay
: Sleep between API calls, this is useful to rate limit calls to servers to prevent overloading them.
-
esbmc_path
: Path to the ESBMC binary. The path undergoes tilde and environment variable expansion, so~
and environment variables can be specified. -
temp_file_dir
: Which directory should ESBMC-AI put temporary files inside?
Chat modes config describes the system messages, and initial prompts that are going to be used in different modes and scenarios during ESBMC-AI execution. The following describes the Chat Modes JSON structure in the config:
Template values are used in the config to specify locations where data should be placed. The following values are accepted:
TBD
Cite paper
TBD
ESBMC-AI made by Yiannis Charalambous
• https://yiannis-charalambous.com • https://github.com/Yiannis128 •