ragbandit-core 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,9 +99,9 @@ class SemanticChunker(BaseChunker):
99
99
  ]
100
100
  idx = full_text.find(current_break_lead)
101
101
 
102
- if idx == -1:
103
- # If we still can't find the snippet after
104
- # trying shorter versions,
102
+ if idx == -1 or idx == 0:
103
+ # If we can't find the snippet, or if the break is at
104
+ # the very start (idx == 0 would create an empty chunk),
105
105
  # fallback: chunk everything as is
106
106
  meta = ChunkMetadata(page_index=i, images=[], extra={})
107
107
  chunks.append(Chunk(text=full_text, metadata=meta))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragbandit-core
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Core utilities for document processing, RAG configuration, querying, and evaluation.
5
5
  Author-email: Martim Chaves <martim@ragbandit.com>
6
6
  License: MIT
@@ -8,7 +8,7 @@ ragbandit/documents/document_pipeline.py,sha256=bDmOjhj8mIbMii3ZTLHA5blzPvdMmD_w
8
8
  ragbandit/documents/chunkers/__init__.py,sha256=U2ptxUtW-e_OCl50kjg-YmKD2e1eGI6iPAWl8hG2W0s,464
9
9
  ragbandit/documents/chunkers/base_chunker.py,sha256=9sCEqn-uVesvYOh2aNbjoN9-mkkAQxml8-nuonr5zUk,6616
10
10
  ragbandit/documents/chunkers/fixed_size_chunker.py,sha256=--OQ5XVhATw4v_MEmfTJPkfUQ2fHXCJyYpWktWVi9JY,5764
11
- ragbandit/documents/chunkers/semantic_chunker.py,sha256=67I2TjytMSB_LWloGWhesOB7Hu4RlYBUsr9T8A9SD2I,7188
11
+ ragbandit/documents/chunkers/semantic_chunker.py,sha256=Qf-dQNCUk84y69Z_MxhG_vO5GsejojdHWnQX9uUCi_E,7241
12
12
  ragbandit/documents/embedders/__init__.py,sha256=6do7BGP8rHCLvIoPIwcK5W751jl8spEfq2smgkoTK3o,418
13
13
  ragbandit/documents/embedders/base_embedder.py,sha256=Bdbmhvi82JxRCBtaY6ZFIbmmPkHriTqtZvvRs6k3dfg,2287
14
14
  ragbandit/documents/embedders/mistral_embedder.py,sha256=T0FPILc7PKIgWxV_lWQbqyP5_LElkuuGtDvn4-Ec6d8,4242
@@ -31,8 +31,8 @@ ragbandit/utils/in_memory_log_handler.py,sha256=vMtCG-Wk9OwiCo2087nQovSIOQCu5ZWX
31
31
  ragbandit/utils/llm_utils.py,sha256=7motkdeez9D_eEBemY6Mw_tZZCCyvt886GEYHv9ddvs,7079
32
32
  ragbandit/utils/mistral_client.py,sha256=VkqFgquyjCmUllBjrHKqQnnmvU3yF0frvCSVIkHH-jQ,2195
33
33
  ragbandit/utils/token_usage_tracker.py,sha256=CMAuJolcdJ258CVMkpNVhZAnQIGC-jTnxYkOr2jvp0M,7196
34
- ragbandit_core-0.1.1.dist-info/licenses/LICENSE.md,sha256=rZBctov8cSToljMmrdApur6WqyMIrX0KjkMKDpqx9w8,1070
35
- ragbandit_core-0.1.1.dist-info/METADATA,sha256=FsGiCB_o8_vMQohVWsGN_o3gHzdM1usLA9Xw5zEi7bc,3924
36
- ragbandit_core-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- ragbandit_core-0.1.1.dist-info/top_level.txt,sha256=UDjwZ4afIob8DIsuV6D08lU5bHCeN00grjXpzgDhsQ8,10
38
- ragbandit_core-0.1.1.dist-info/RECORD,,
34
+ ragbandit_core-0.1.2.dist-info/licenses/LICENSE.md,sha256=rZBctov8cSToljMmrdApur6WqyMIrX0KjkMKDpqx9w8,1070
35
+ ragbandit_core-0.1.2.dist-info/METADATA,sha256=oX0mi24XkPF58dd2xOIY-0IkNFmYqhl1g1Qw7rXaok0,3924
36
+ ragbandit_core-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ ragbandit_core-0.1.2.dist-info/top_level.txt,sha256=UDjwZ4afIob8DIsuV6D08lU5bHCeN00grjXpzgDhsQ8,10
38
+ ragbandit_core-0.1.2.dist-info/RECORD,,