Skip to content

contextcrunch-ai/contextcrunch-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContextCrunch Python Client

Use the ContextCrunch API easily with python!

Prerequsites

Quick Start

from contextcrunch import ContextCrunchClient
client = ContextCrunchClient('API_KEY_HERE')

compressed = client.compress(
  context=['compress this text'],
  prompt='last message',
  compression_ratio=0.95
)
print(f'Although this text is too short to compress, we can see the API works! {compressed}')

Uploading to PyPi

python3 -m build
python3 -m twine upload dist/*

Username: __token__

About

Compress LLM Prompts and save 80%+ on GPT-4 in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages