Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --require option #47

Closed
MadBomber opened this issue Mar 4, 2024 · 1 comment
Closed

Add a --require option #47

MadBomber opened this issue Mar 4, 2024 · 1 comment

Comments

@MadBomber
Copy link
Owner

When using the embedded ruby (--erb) option to indicate that the prompt file needs to be pre-processed through the ERB system, that embedded code may need access to Ruby libraries.

aia prompt_id --erb --require lib1,lib2,lib3 --shell

should pre-load all of the libaries so that the ERB code can access the classes as necessary. FOr example, if you have ActiveRecord classes that you want the ERB code to reference as part of the prompt generation process.

@MadBomber
Copy link
Owner Author

within the context of the prompt file, inside the ERB you can also do require statements. This new --require options only purpose seems to be to DRY up multiple prompts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant