PHP Config File
Everything on the plugin's Settings page can also be managed via PHP in a config file. By setting these values in config/sidekick.php, they take precedence over whatever may be set in the control panel.
shell
# Copy this file...
/vendor/doublesecretagency/craft-sidekick/src/config.php
# To here... (and rename it)
/config/sidekick.phpMuch like the db.php and general.php files, sidekick.php is environmentally aware. You can also pass in environment values using the getenv PHP method.
php
return [
// OpenAI API Key
'openAiApiKey' => getenv('OPENAI_API_KEY')
];Settings Available via Control Panel
The OpenAI API key and other settings can also be managed on the Settings page (preferably using env values).
openAiApiKey
string - Defaults to null.
The OpenAI API key to use for all requests.