Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

contextcrunch-ai/contextcrunch-python

Open more actions menu

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.