Skip to content

Commit

Permalink
Release(LLMLingua): release v0.2.0 (#109)
Browse files Browse the repository at this point in the history
Co-authored-by: siyunzhao <[email protected]>
Co-authored-by: Qianhui Wu <[email protected]>
Co-authored-by: Xufang Luo <[email protected]>
Co-authored-by: Yuqing Yang <[email protected]>
  • Loading branch information
5 people authored Mar 13, 2024
1 parent c4e82e1 commit 00d5271
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions llmlingua/prompt_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,14 @@ def sync_sentence(sentences, text):
sentence_num = len(sentences)
new_sentences = []
for i, s in enumerate(sentences):
assert s == text[seen_text: seen_text + len(s)]
assert s == text[seen_text : seen_text + len(s)]
if i == sentence_num - 1:
new_sentences.append(text[seen_text:])
break
next_sentence_start = text.find(sentences[i + 1][:5], seen_text + len(s))
new_sentences.append(text[seen_text: next_sentence_start])
next_sentence_start = text.find(
sentences[i + 1][:5], seen_text + len(s)
)
new_sentences.append(text[seen_text:next_sentence_start])
seen_text = next_sentence_start
assert "".join(new_sentences) == text
return new_sentences
Expand Down
4 changes: 2 additions & 2 deletions llmlingua/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Licensed under The MIT License [see LICENSE for details]

_MAJOR = "0"
_MINOR = "1"
_MINOR = "2"
# On master and in a nightly release the patch should be one ahead of the last
# released build.
_PATCH = "6"
_PATCH = "0"
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
# https://semver.org/#is-v123-a-semantic-version for the semantics.
_SUFFIX = ""
Expand Down

0 comments on commit 00d5271

Please sign in to comment.