mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 07:42:40 +00:00
feat: rag configuration with optional dependency support (#3394)
### RAG Config System * Added ChromaDB client creation via config with sensible defaults * Introduced optional imports and shared RAG config utilities/schema * Enabled embedding function support with ChromaDB provider integration * Refactored configs for immutability and stronger type safety * Removed unused code and expanded test coverage
This commit is contained in:
14
src/crewai/rag/config/optional_imports/protocols.py
Normal file
14
src/crewai/rag/config/optional_imports/protocols.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""Protocol definitions for RAG factory modules."""
|
||||
|
||||
from typing import Protocol
|
||||
|
||||
from crewai.rag.config.types import RagConfigType
|
||||
from crewai.rag.core.base_client import BaseClient
|
||||
|
||||
|
||||
class ChromaFactoryModule(Protocol):
|
||||
"""Protocol for ChromaDB factory module."""
|
||||
|
||||
def create_client(self, config: RagConfigType) -> BaseClient:
|
||||
"""Creates a ChromaDB client from configuration."""
|
||||
...
|
||||
Reference in New Issue
Block a user