refactor: streamline tracing condition checks and clean up deprecated warnings (#3358)

This commit simplifies the conditions for enabling tracing in both the Crew and Flow classes by removing the redundant call to `on_first_execution_tracing_confirmation()`. Additionally, it removes deprecated warning filters related to Pydantic in the KnowledgeStorage and RAGStorage classes, improving code clarity and maintainability.
This commit is contained in:
Lorenze Jay
2025-08-18 19:56:00 -07:00
committed by GitHub
parent 6068fe941f
commit d743e12a06
4 changed files with 13 additions and 20 deletions

View File

@@ -11,7 +11,6 @@ import chromadb.errors
from chromadb.api import ClientAPI
from chromadb.api.types import OneOrMany
from chromadb.config import Settings
from pydantic.warnings import PydanticDeprecatedSince211
import warnings
from crewai.knowledge.storage.base_knowledge_storage import BaseKnowledgeStorage
@@ -91,7 +90,6 @@ class KnowledgeStorage(BaseKnowledgeStorage):
# TODO: Remove this once we upgrade chromadb to at least 1.0.8.
warnings.filterwarnings(
"ignore",
category=PydanticDeprecatedSince211,
message=r".*'model_fields'.*is deprecated.*",
module=r"^chromadb(\.|$)",
)