mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 00:02:36 +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:
@@ -15,12 +15,10 @@ def create_client(config: ChromaDBConfig) -> ChromaDBClient:
|
||||
Returns:
|
||||
Configured ChromaDBClient instance.
|
||||
"""
|
||||
chromadb_client = Client(
|
||||
settings=config.settings, tenant=config.tenant, database=config.database
|
||||
|
||||
return ChromaDBClient(
|
||||
client=Client(
|
||||
settings=config.settings, tenant=config.tenant, database=config.database
|
||||
),
|
||||
embedding_function=config.embedding_function,
|
||||
)
|
||||
|
||||
client = ChromaDBClient()
|
||||
client.client = chromadb_client
|
||||
client.embedding_function = config.embedding_function
|
||||
|
||||
return client
|
||||
|
||||
Reference in New Issue
Block a user