Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
Force integer type for the chunk_size var
  • Loading branch information
tpai committed Jul 22, 2023
1 parent 07ed0a0 commit 392a52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_chunks(paragraphs):
chunks = []
chunk = ''
for paragraph in paragraphs:
if len(chunk) + len(paragraph) < chunk_size:
if len(chunk) + len(paragraph) < int(chunk_size):
chunk += paragraph + ' '
else:
chunks.append(chunk.strip())
Expand Down

0 comments on commit 392a52c

Please sign in to comment.