fix: remove crewai dependency and add import guards in crewai components (#8923)
This commit is contained in:
parent
8fdd23a9b6
commit
24db0cdc73
14 changed files with 716 additions and 951 deletions
|
|
@ -6,5 +6,5 @@ async def test_get_starter_projects(client: AsyncClient, logged_in_headers):
|
|||
response = await client.get("api/v1/starter-projects/", headers=logged_in_headers)
|
||||
result = response.json()
|
||||
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
assert response.status_code == status.HTTP_200_OK, response.text
|
||||
assert isinstance(result, list), "The result must be a list"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,14 @@ from langflow.schema import dotdict
|
|||
from langflow.template import Output
|
||||
from typing_extensions import override
|
||||
|
||||
crewai_available = False
|
||||
try:
|
||||
import crewai # noqa: F401
|
||||
|
||||
crewai_available = True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
def test_set_invalid_output():
|
||||
chatinput = ChatInput()
|
||||
|
|
@ -17,6 +25,7 @@ def test_set_invalid_output():
|
|||
chatoutput.set(input_value=chatinput.build_config)
|
||||
|
||||
|
||||
@pytest.mark.skipif(not crewai_available, reason="CrewAI is not installed")
|
||||
def test_set_component():
|
||||
crewai_agent = CrewAIAgentComponent()
|
||||
task = SequentialTaskComponent()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue