-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Use CREWAI_PROMPT_FILE environment variable. #777
base: main
Are you sure you want to change the base?
Conversation
CrewAI initializes several I18N instances deep within the library at package initialization time, using the default prompts. This makes overriding the defaults consistently throughout the package very difficult, requiring monkeypatching. This change will allow overriding the default prompt file location in the $CREWAI_PROMPT_FILE environment variable, allowing consistency throughout the library.
Oh interesting I didn't realize that was the case, wouldn't that still be a problem even if we use the ENV var thought given the current changes? I might be missing something it's 1am lol |
Most manually initialized objects can be passed a custom I18N object, but the main problem was the CrewAgentExecutor import calling into Prompts with the default I18N object (I think this is occurring through the memory function). This is being initialized in the agents package's __ init __.py, which prevents getting an override in via a parameter early. You're either stuck with layers of deep overrides of core Crew classes such as CrewAgentExecutor or something like an environment variable or monkeypatching I18N that applies globally. |
This PR is stale because it has been open for 45 days with no activity. |
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #777: Use CREWAI_PROMPT_FILE Environment VariableOverviewThis pull request introduces an important enhancement to the CrewAI library by allowing configuration of the prompt file location through the File:
|
Hey @mbarnathan thanks for the Pull Request. Since there have been quite a few changes to the project since July 6, could you please take a moment to check if this PR is still relevant? Thank you |
CrewAI initializes several I18N instances deep within the library at package initialization time, using the default prompts.
Despite the ability to specify prompt files within a Crew, the defaults will still be used in several places throughout the
workflow of calling that Crew. Overriding the defaults consistently throughout the package currently requires monkeypatching.
This change will allow overriding the default prompt file location in the $CREWAI_PROMPT_FILE environment variable, allowing consistency throughout the library.