Skip to content

Commit 0dc8e97

Browse files
authored
INTPYTHON-686 Make crewai tests more reliable (#87)
1 parent d05e7f1 commit 0dc8e97

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crewai-tools/test_mongodb_vector_search_tool.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from crewai import Agent
33
from crewai import Task
44
from crewai import Crew, Process, LLM
5-
from crewai.cli.constants import DEFAULT_LLM_MODEL
65
from crewai_tools import MongoDBVectorSearchTool, MongoDBVectorSearchConfig
76
from langchain_community.document_loaders import PyPDFLoader
87
import time
@@ -55,9 +54,9 @@
5554
role="AI Accuracy Researcher",
5655
goal="Find and extract key information from a technical document",
5756
backstory="You're specialized in analyzing technical content to extract insights and answers",
58-
verbose=False,
57+
verbose=True,
5958
tools=[tool],
60-
llm=LLM(model=f"azure/{DEFAULT_LLM_MODEL}"),
59+
llm=LLM(model="azure/gpt-4o", seed=12345),
6160
)
6261
research_task = Task(
6362
description="Research information in a technical document",
@@ -68,12 +67,12 @@
6867
agents=[researcher],
6968
tasks=[research_task],
7069
process=Process.sequential,
71-
verbose=False,
70+
verbose=True,
7271
)
7372

7473
# Get the result and assert something about the results
7574
print("Running the crew...")
7675
result = crew.kickoff()
7776
text = result.raw.lower()
78-
assert "advancements" in text or "improvements" in text, text
77+
assert "limitations" in text, text
7978
assert "GPT-4" in result.raw

0 commit comments

Comments
 (0)