mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
- add batch_size field to baseragconfig (default=100) - update chromadb/qdrant clients and factories to use batch_size - extract and filter batch_size from embedder config in knowledgestorage - fix large csv files exceeding embedder token limits (#3574) - remove unneeded conditional for type Co-authored-by: Vini Brasil <vini@hey.com>
20 lines
601 B
Python
20 lines
601 B
Python
"""Base configuration class for RAG providers."""
|
|
|
|
from dataclasses import field
|
|
from typing import Any
|
|
|
|
from pydantic.dataclasses import dataclass as pyd_dataclass
|
|
|
|
from crewai.rag.config.optional_imports.types import SupportedProvider
|
|
|
|
|
|
@pyd_dataclass(frozen=True)
|
|
class BaseRagConfig:
|
|
"""Base class for RAG configuration with Pydantic serialization support."""
|
|
|
|
provider: SupportedProvider = field(init=False)
|
|
embedding_function: Any | None = field(default=None)
|
|
limit: int = field(default=5)
|
|
score_threshold: float = field(default=0.6)
|
|
batch_size: int = field(default=100)
|