Code Configuration
To allow added flexibility and eventually support an entire plugin ecosystem, Continue can be configured programmatically in a Python file, ~/.continue/config.ts.
Whenever Continue loads, it carries out the following steps:
- Load
~/.continue/config.json - Convert this into a
Configobject - If
~/.continue/config.tsexists and has definedmodifyConfigcorrectly, callmodifyConfigwith theConfigobject to generate the final configuration
Defining a modifyConfig function allows you to make any final modifications to your initial config.json. Here's an example that sets the temperature to a random number and maxTokens to 1024:
~/.continue/config.ts
export function modifyConfig(config: Config): Config {
config.completionOptions = {
...config.completionOptions,
temperature: Math.random(),
maxTokens: 1024,
};
return config;
}