mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
- Fix issue #3: Make similarity_threshold and limit optional with defaults - Updated BaseTool._default_args_schema to extract default values from function signatures - Updated BaseTool._set_args_schema for consistency - Now uses inspect.signature() and pydantic.create_model() to properly handle defaults - Fix issue #1: Make qdrant_client import conditional - Moved qdrant_client imports to TYPE_CHECKING block - Added runtime imports only when QdrantConfig is actually used - Prevents import errors when using ChromaDB without qdrant_client installed - Added comprehensive tests: - test_rag_tool_default_parameters_are_optional: Verifies schema has correct required fields - test_rag_tool_chromadb_no_qdrant_import: Ensures ChromaDB usage doesn't import qdrant_client All existing tests pass. Fixes reported issues where LLM calls would fail with ValidationError on first attempt due to required fields that should have been optional. Co-Authored-By: João <joao@crewai.com>