Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje committed Jan 25, 2025
1 parent 27e8aff commit d1a5165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogen/retrieve_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def split_text_to_chunks(
lines_tokens = [count_token(line) for line in lines]
sum_tokens = sum(lines_tokens)
while sum_tokens > max_tokens:
estimated_line_cut = 2 if sum_tokens > max_tokens else max(int(max_tokens / sum_tokens * len(lines)), 2)
estimated_line_cut = 2 if chunk_mode == "one_line" else max(int(max_tokens / sum_tokens * len(lines)), 2)
cnt = 0
prev = ""
for cnt in reversed(range(estimated_line_cut)):
Expand Down

0 comments on commit d1a5165

Please sign in to comment.