tokenshrink 0.2.2__tar.gz → 0.2.3__tar.gz

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.
Files changed (26) hide show
  1. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/PKG-INFO +1 -1
  2. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/pyproject.toml +1 -1
  3. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/src/tokenshrink/__init__.py +1 -1
  4. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/src/tokenshrink/cli.py +3 -1
  5. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/src/tokenshrink/pipeline.py +1 -1
  6. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/.github/ISSUE_TEMPLATE/feedback.md +0 -0
  7. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/.gitignore +0 -0
  8. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/Dockerfile +0 -0
  9. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/LICENSE +0 -0
  10. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/README.md +0 -0
  11. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docker-compose.test.yml +0 -0
  12. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/ASSETS.md +0 -0
  13. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/index.html +0 -0
  14. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/marketing/origin-story-post.md +0 -0
  15. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/marketing/reddit-log.md +0 -0
  16. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/marketing/reddit-posts.md +0 -0
  17. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/marketing/reddit-routine.md +0 -0
  18. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/docs/monitoring-log.md +0 -0
  19. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/site/index.html +0 -0
  20. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/src/tokenshrink/__main__.py +0 -0
  21. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/tests/conftest.py +0 -0
  22. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/tests/test_cli.py +0 -0
  23. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/tests/test_integration.py +0 -0
  24. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/tests/test_pipeline.py +0 -0
  25. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/tests/test_stress.py +0 -0
  26. {tokenshrink-0.2.2 → tokenshrink-0.2.3}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tokenshrink
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Cut your AI costs 50-80%. FAISS retrieval + LLMLingua compression + REFRAG-inspired adaptive optimization.
5
5
  Project-URL: Homepage, https://tokenshrink.dev
6
6
  Project-URL: Repository, https://github.com/MusashiMiyamoto1-cloud/tokenshrink
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tokenshrink"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Cut your AI costs 50-80%. FAISS retrieval + LLMLingua compression + REFRAG-inspired adaptive optimization."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -23,7 +23,7 @@ CLI:
23
23
  tokenshrink stats
24
24
  """
25
25
 
26
- __version__ = "0.2.2"
26
+ __version__ = "0.2.3"
27
27
 
28
28
  def __getattr__(name):
29
29
  if name in ("TokenShrink", "ShrinkResult", "ChunkScore"):
@@ -128,11 +128,13 @@ def main():
128
128
  import os, logging, warnings
129
129
  os.environ["TRANSFORMERS_VERBOSITY"] = "error"
130
130
  os.environ["HF_HUB_DISABLE_PROGRESS_BARS"] = "1"
131
+ os.environ["HF_HUB_DISABLE_TELEMETRY"] = "1"
131
132
  os.environ["TOKENIZERS_PARALLELISM"] = "false"
133
+ os.environ["TQDM_DISABLE"] = "1"
132
134
  logging.getLogger("sentence_transformers").setLevel(logging.ERROR)
133
135
  logging.getLogger("transformers").setLevel(logging.ERROR)
134
136
  logging.getLogger("huggingface_hub").setLevel(logging.ERROR)
135
- warnings.filterwarnings("ignore", message=".*unauthenticated.*")
137
+ warnings.filterwarnings("ignore") # suppress all warnings in quiet mode
136
138
 
137
139
  # Lazy import to avoid loading ML models for --help/--version
138
140
  from tokenshrink import TokenShrink
@@ -613,7 +613,7 @@ class TokenShrink:
613
613
  "ratio": total_compressed / total_original if total_original else 1.0,
614
614
  }
615
615
 
616
- def search(self, question: str, k: int = 5, min_score: float = 0.15) -> list[dict]:
616
+ def search(self, question: str, k: int = 5, min_score: float = 0.05) -> list[dict]:
617
617
  """Search without compression. Returns raw chunks with scores."""
618
618
  if self._index.ntotal == 0:
619
619
  return []
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes