Repository navigation
Conversation
from crewai import CrewBase raises ImportError because CrewBase is exported from crewai.project. Update the edge hook examples and the matching ar, ko, and pt-BR pages. Leave frozen docs/v* snapshots unchanged. Fixes crewAIInc#8581 Co-authored-by: wannT-1 <wannT-1@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Fixes crewAIInc#8581
Summary
Hook examples documented
from crewai import CrewBase. That import raisesImportError: cannot import name 'CrewBase' from 'crewai'becauseCrewBaseis not exported from the top-levelcrewaipackage. The class lives increwai.project(from crewai.project import CrewBase).Edge docs under
docs/edge/en,docs/edge/ar,docs/edge/ko, anddocs/edge/pt-BRnow use that path. Where afrom crewai.project import ...line was already next to the bad import, the two lines are merged. Frozendocs/v*snapshots are unchanged.Pages updated:
learn/before-and-after-kickoff-hooks.mdx(en, ar, ko, pt-BR)learn/execution-hooks.mdx(en, ar, ko, pt-BR)learn/llm-hooks.mdx(ko, pt-BR)learn/tool-hooks.mdx(ko, pt-BR)Verification
from crewai import CrewBasefails withImportError: cannot import name 'CrewBase' from 'crewai'.from crewai.project import CrewBasesucceeds (CrewBaseiscrewai.project.crew_base.CrewBase). Merged formsCrewBase, before_kickoff,CrewBase, after_kickoff, andCrewBase, crewalso import.git grep -n "from crewai import CrewBase" -- docs/edge/returns no hits.main).Additional context
Prepared with AI assistance. This PR requires the
llm-generatedlabel under the contribution policy.