.=*****************************+=:.
:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+-.
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+.
:+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#@@@@@@@#+.
..-+*@@@@@#=
.-%@@@@+.
.::::::::::::::::::::::::::::::::::....=%@@#:
=#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+-=%@@+
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*=*@#:
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*+*@*:
.:------------------------------------=+%#@@@@@*-+#%=:.
.-+#@@@#=:+#@@#%****++++++++++++++++++++++++++++.
.-%@@@=.:*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=
.=*****************************************+=-:. .=*@#= :=+******************************:
:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+=+%@#=.
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@%*==============================.
.=*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
..-=*#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
.:-=*%#@@@#%+=::..:::::::::::::::::::::::::::
.:-------------------------------------=+*%##@@@@@@%+:
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*=. .-+*%##############################-
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+- .=%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@-
=#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%*+-. :+%##%+=----------------------------------.
.:::::::::::::::::::::::::::::::::::.. :+#@%=.
.-*#@@%-
..:-=*#@@@@%-
:+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##@@@@@@@@%-
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*-
:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+:.
.=+***************************++=-:.from llmslim import compress
result = compress(chat_history, target_ratio=0.25,
query="Where should the card be shipped?")
print(result.compressed_text) # what the model needs
print(result.tokens_saved) # what you no longer pay for .=*****************************+=:.
:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+-.
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+.
:+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#@@@@@@@#+.
..-+*@@@@@#=
.-%@@@@+.
.::::::::::::::::::::::::::::::::::....=%@@#:
=#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+-=%@@+
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*=*@#:
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*+*@*:
.:------------------------------------=+%#@@@@@*-+#%=:.
.-+#@@@#=:+#@@#%****++++++++++++++++++++++++++++.
.-%@@@=.:*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=
.=*****************************************+=-:. .=*@#= :=+******************************:
:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+=+%@#=.
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@%*==============================.
.=*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
..-=*#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
.:-=*%#@@@#%+=::..:::::::::::::::::::::::::::
.:-------------------------------------=+*%##@@@@@@%+:
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*=. .-+*%##############################-
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+- .=%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@-
=#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%*+-. :+%##%+=----------------------------------.
.:::::::::::::::::::::::::::::::::::.. :+#@%=.
.-*#@@%-
..:-=*#@@@@%-
:+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##@@@@@@@@%-
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*-
:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+:.
.=+***************************++=-:.from llmslim import compress
result = compress(chat_history, target_ratio=0.25,
query="Where should the card be shipped?")
print(result.compressed_text) # what the model needs
print(result.tokens_saved) # what you no longer pay forAccount
Create your account.
Sign up with Google, GitHub or your email address. You can add a passkey afterwards.
or sign up with email
Already have an account? Sign in