File "/Users/guertethiaf/Documents/jamstack/muniai/anabondsbackend/main.py", line 33, in chunk_text_semantically
text_splitter = SemanticChunker(HuggingFaceEmbeddings(), breakpoint_threshold_type="gradient")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langchain_experimental/text_splitter.py", line 124, in __init__
self.breakpoint_threshold_amount = BREAKPOINT_DEFAULTS[
^^^^^^^^^^^^^^^^^^^^
KeyError: 'gradient'
Description
When trying to use the SemanticChunker with 'gradient' as a breakpoint_threshold_type I noticed it always gave me a key error.
After checking /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langchain_experimental/text_splitter.py I noticed the option wasn't present.
It's present in the repository and was merged I think a week ago.
System Info
System Information
OS: Darwin
OS Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:27 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8103
Python Version: 3.12.4 (v3.12.4:8e8a4baf65, Jun 6 2024, 17:33:18) [Clang 13.0.0 (clang-1300.0.29.30)]
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
After checking
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/langchain_experimental/text_splitter.py
I noticed the option wasn't present.It's present in the repository and was merged I think a week ago.
System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found: