copy_template( )¶
Copy a template environment to a user-specified directory.
This function copies a pre-configured evaluation environment template to a destination directory where users can customize it for their specific evaluation needs.
| PARAMETER | DESCRIPTION |
|---|---|
template_name
|
Name of the template to copy (e.g., "apps")
TYPE:
|
destination
|
Path where the template should be copied
TYPE:
|
overwrite
|
If True, overwrite existing directory. If False, raise error if directory exists
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the template doesn't exist |
FileExistsError
|
If destination exists and overwrite=False |
Example
copy_template("apps", "./my-custom-apps")
# Output: Copied template 'apps' to my-custom-apps
# You can now customize the files and run:
# run_eval(environment_dir="./my-custom-apps", model="gpt-4", environment_mode="honest")
# To overwrite existing directory
copy_template("apps", "./my-custom-apps", overwrite=True)