Closed umarbutler closed 6 months ago
Memoization is destorying semchunk.chunk()'s signature as described in this issue. A fix is to run:
semchunk.chunk()
def chunk(text: str, chunk_size: int, token_counter: callable, memoize: bool=True, _recursion_depth: int = 0) -> list[str]: ... chunk = functools.wraps(chunk)(functools.cache(chunk))
Instead of:
@functools.cache def chunk(text: str, chunk_size: int, token_counter: callable, memoize: bool=True, _recursion_depth: int = 0) -> list[str]: ...
This bug has been fixed in v0.2.3.
Memoization is destorying
semchunk.chunk()
's signature as described in this issue. A fix is to run:Instead of: