Skip to content

INTPYTHON-686 Make crewai tests more reliable #87

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

Merged
merged 5 commits into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions crewai-tools/test_mongodb_vector_search_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from crewai import Agent
from crewai import Task
from crewai import Crew, Process, LLM
from crewai.cli.constants import DEFAULT_LLM_MODEL
from crewai_tools import MongoDBVectorSearchTool, MongoDBVectorSearchConfig
from langchain_community.document_loaders import PyPDFLoader
import time
Expand Down Expand Up @@ -55,9 +54,9 @@
role="AI Accuracy Researcher",
goal="Find and extract key information from a technical document",
backstory="You're specialized in analyzing technical content to extract insights and answers",
verbose=False,
verbose=True,
tools=[tool],
llm=LLM(model=f"azure/{DEFAULT_LLM_MODEL}"),
llm=LLM(model="azure/gpt-4o", seed=12345),
)
research_task = Task(
description="Research information in a technical document",
Expand All @@ -68,12 +67,12 @@
agents=[researcher],
tasks=[research_task],
process=Process.sequential,
verbose=False,
verbose=True,
)

# Get the result and assert something about the results
print("Running the crew...")
result = crew.kickoff()
text = result.raw.lower()
assert "advancements" in text or "improvements" in text, text
assert "limitations" in text, text
assert "GPT-4" in result.raw