forked from cardosofelipe/fast-next-template
Implements RAG capabilities with pgvector for semantic search: - Intelligent chunking strategies (code-aware, markdown-aware, text) - Semantic search with vector similarity (HNSW index) - Keyword search with PostgreSQL full-text search - Hybrid search using Reciprocal Rank Fusion (RRF) - Redis caching for embeddings - Collection management (ingest, search, delete, stats) - FastMCP tools: search_knowledge, ingest_content, delete_content, list_collections, get_collection_stats, update_document Testing: - 128 comprehensive tests covering all components - 58% code coverage (database integration tests use mocks) - Passes ruff linting and mypy type checking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
452 B
Python
20 lines
452 B
Python
"""
|
|
Chunking module for Knowledge Base MCP Server.
|
|
|
|
Provides intelligent content chunking for different file types
|
|
with overlap and context preservation.
|
|
"""
|
|
|
|
from chunking.base import BaseChunker, ChunkerFactory
|
|
from chunking.code import CodeChunker
|
|
from chunking.markdown import MarkdownChunker
|
|
from chunking.text import TextChunker
|
|
|
|
__all__ = [
|
|
"BaseChunker",
|
|
"ChunkerFactory",
|
|
"CodeChunker",
|
|
"MarkdownChunker",
|
|
"TextChunker",
|
|
]
|