-
Notifications
You must be signed in to change notification settings - Fork 7.6k
fix: force output visibility for human_input when verbose is False #6243
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import sys | ||
| # Forcing Python to read the precise source directories for both components | ||
| sys.path.insert(0, r"C:\Users\zero\crewAI\lib\crewai\src") | ||
| sys.path.insert(0, r"C:\Users\zero\crewAI\lib\crewai-core\src") | ||
|
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove machine-specific Hardcoded local Windows paths are not portable and can cause environment-dependent import behavior. If this is a local repro utility, keep it out of the repository test surface or resolve paths relative to repo root in a dev-only script. 🤖 Prompt for AI Agents |
||
|
|
||
| from crewai import Agent, Crew, Task, Process | ||
| from crewai.llms.base_llm import BaseLLM | ||
|
|
||
| class StubLLM(BaseLLM): | ||
| def call(self, messages, tools=None, callbacks=None, available_functions=None, | ||
| from_task=None, from_agent=None, response_model=None): | ||
| return "Thought: I know it.\nFinal Answer: The sky is blue." | ||
|
|
||
| def supports_function_calling(self) -> bool: | ||
| return False | ||
|
|
||
| agent = Agent(role="Tester", goal="Be a Minimal Reproduction", backstory="bg", | ||
| llm=StubLLM(model="stub"), verbose=False) | ||
|
|
||
| task = Task(description="Sky colour?", expected_output="a colour", | ||
| agent=agent, human_input=True) | ||
|
|
||
| Crew(agents=[agent], tasks=[task], process=Process.sequential, verbose=False).kickoff() | ||
|
Comment on lines
+17
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid import-time interactive execution in a This executes 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the duplicate human-feedback invocation in sync flow.
formatted_answeris passed to_handle_human_feedback(...)twice in theask_for_human_inputbranch (Line 2806 and Line 2808), which can trigger two prompts/loops instead of one.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents