mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 08:16:38 +00:00
feat: semantic chunking + pgvector hybrid (BM25+vector) retriever (#2553)
This commit is contained in:
16 files changed
+684
-36
No files matched your search
@@ -68,6 +68,18 @@ class TestStrictWrite:
|
||||
with pytest.raises(ValidationError):
|
||||
SourceConfig.model_validate({"unexpected": True})
|
||||
|
||||
def test_chunks_upper_bound_rejected(self):
|
||||
with pytest.raises(ValidationError):
|
||||
RetrievalConfig(chunks=501)
|
||||
|
||||
def test_chunks_lower_bound_rejected(self):
|
||||
with pytest.raises(ValidationError):
|
||||
RetrievalConfig(chunks=0)
|
||||
|
||||
def test_chunks_accepts_small_and_ceiling_values(self):
|
||||
assert RetrievalConfig(chunks=2).chunks == 2
|
||||
assert RetrievalConfig(chunks=500).chunks == 500
|
||||
|
||||
def test_model_validate_accepts_full_valid_config(self):
|
||||
cfg = SourceConfig.model_validate(
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user