- Using
Settingsclass methodsetPath() - Using environment variable (recommended)
To check how to publish configuration files to your project see Setup section.
Setting Configuration Path via Settings Class
You can set Instructor configuration path using the Settings::setPath() method:
Setting Configuration Path via Environment Variable
You can set the path to Instructor’s configuration directory in your.env file:
Configuration Location Resolution
Instructor uses a configuration directory with a set of.php files to store its settings, e.g. LLM provider configurations.
Instructor will look for its configuration location in the following order:
- If static variable value
$pathinSettingsclass is set, it will use it, - If
INSTRUCTOR_CONFIG_PATHSenvironment variable is set, it will use its value, - Finally, it will default to the directory, which is bundled with Instructor package (under
/config) and contains default set of configuration files.