Skip to main content

Token optimization and compression for Claude API requests

Project description

Tailspin AI

Token optimization and compression for Claude API requests. Reduces token usage while maintaining context quality through intelligent compression, caching, and context management.

Installation

pip install tailspin-ai

Usage

See main Tailspin repository for documentation and examples.

Features

  • Smart Compression: Automatic token optimization for text, code, and logs
  • Semantic Caching: Cache-aware compression that preserves prefix stability
  • LiteLLM Integration: Route requests to any LLM provider via LiteLLM
  • Context Management: Intelligent context windowing and summarization
  • Compression Pipeline: Extensible transform pipeline for custom compression logic

Configuration

Configure via environment variables or config.py:

litellm_enabled: bool = False
litellm_endpoint: str = ""
litellm_api_key: str = ""
litellm_provider: str = "hosted_vllm"

Contributing

Contributions welcome. See main repository.

License

MIT

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

tailspin_ai-0.5.29.tar.gz (912.3 kB view details)

Uploaded Source

Built Distribution

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

tailspin_ai-0.5.29-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file tailspin_ai-0.5.29.tar.gz.

File metadata

  • Download URL: tailspin_ai-0.5.29.tar.gz
  • Upload date:
  • Size: 912.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tailspin_ai-0.5.29.tar.gz
Algorithm Hash digest
SHA256 d5d6ae8437cf211795927bcfb4f176761039e981674c14dd40caebc85378c105
MD5 6186652ccf56e55d4b5c63058010c19d
BLAKE2b-256 cec17868a057b28b0a5e0726882c4f0e5345f4336612311d76ba5b7060efbd8b

See more details on using hashes here.

File details

Details for the file tailspin_ai-0.5.29-py3-none-any.whl.

File metadata

  • Download URL: tailspin_ai-0.5.29-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tailspin_ai-0.5.29-py3-none-any.whl
Algorithm Hash digest
SHA256 24b0cf9a9fb45c738348f59815d967d121c03dc846ee7f8c6554f6c0a4af601a
MD5 6517ac61472dc4704e144652f9fd4bcf
BLAKE2b-256 fc90d4b682ceae9f3abcdc10d5de7325086b2978e0f758a8f2288a4733c51912

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