Skip to main content

LangChain integrations for the TokenSqueezer x402 LLM token compression API

Project description

tokensqueezer-tools

PyPI client for TokenSqueezer — x402-gated LLM token compression.

pip install "tokensqueezer-tools[x402,langchain]"
# also available via monorepo:
# pip install "nodeproxy-tools[tokensqueezer]"
export EVM_PRIVATE_KEY=0x...

from tokensqueezer_tools import TokenSqueezerClient

client = TokenSqueezerClient()
result = client.compress("Long noisy agent feed text…", aggressive=True)
print(result.stats.tokens_saved, result.compressed[:200])
from tokensqueezer_tools.langchain import TokenSqueezerTool

tool = TokenSqueezerTool()
tool.invoke({"text": "Raw RSS firehose blob…"})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokensqueezer_tools-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokensqueezer_tools-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file tokensqueezer_tools-0.1.0.tar.gz.

File metadata

  • Download URL: tokensqueezer_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for tokensqueezer_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fef9177d210620e31b95b898ec657011543ca15e3409ca01f6256397656d1fe1
MD5 edd7308ac8bc28be69e878ce727b7491
BLAKE2b-256 c18ff93f11790eb2df3883edd6960f4123532cad04d20e704b0db7bc69240f9f

See more details on using hashes here.

File details

Details for the file tokensqueezer_tools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tokensqueezer_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bb118e63488650c760db8e514a716f93870d265eb6b5739ab87f4cc9dbf8e99
MD5 d2af06a1203fc0efd998e575f354f1cc
BLAKE2b-256 4263d52461ddb69c72be84f677b255874cadb33c836885061f6225a7975bed44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page