mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-24 15:48:23 +00:00
refactor: simplify rag client initialization (#3401)
* Simplified Qdrant and ChromaDB client initialization * Refactored factory structure and updated tests accordingly
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from crewai.rag.config.factory import create_client
|
||||
from crewai.rag.factory import create_client
|
||||
|
||||
|
||||
def test_create_client_chromadb():
|
||||
@@ -10,7 +10,7 @@ def test_create_client_chromadb():
|
||||
mock_config = Mock()
|
||||
mock_config.provider = "chromadb"
|
||||
|
||||
with patch("crewai.rag.config.factory.require") as mock_require:
|
||||
with patch("crewai.rag.factory.require") as mock_require:
|
||||
mock_module = Mock()
|
||||
mock_client = Mock()
|
||||
mock_module.create_client.return_value = mock_client
|
||||
|
||||
Reference in New Issue
Block a user