mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
* Added Qdrant provider support with factory, config, and protocols * Improved default embeddings and type definitions * Fixed ChromaDB factory embedding assignment
28 lines
829 B
Python
28 lines
829 B
Python
"""Protocol definitions for RAG factory modules."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Protocol, TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from crewai.rag.chromadb.client import ChromaDBClient
|
|
from crewai.rag.chromadb.config import ChromaDBConfig
|
|
from crewai.rag.qdrant.client import QdrantClient
|
|
from crewai.rag.qdrant.config import QdrantConfig
|
|
|
|
|
|
class ChromaFactoryModule(Protocol):
|
|
"""Protocol for ChromaDB factory module."""
|
|
|
|
def create_client(self, config: ChromaDBConfig) -> ChromaDBClient:
|
|
"""Creates a ChromaDB client from configuration."""
|
|
...
|
|
|
|
|
|
class QdrantFactoryModule(Protocol):
|
|
"""Protocol for Qdrant factory module."""
|
|
|
|
def create_client(self, config: QdrantConfig) -> QdrantClient:
|
|
"""Creates a Qdrant client from configuration."""
|
|
...
|