- 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
Settings::setPath()has been called, it will use that custom path list, - If
INSTRUCTOR_CONFIG_PATHS(orINSTRUCTOR_CONFIG_PATH) environment variable is set, it will use that value, - Finally, it will default to the directory, which is bundled with Instructor package (under
/config) and contains default set of configuration files.