Skip to content

Commit

Permalink
Add an option to set the chunk size using the
Browse files Browse the repository at this point in the history
configoration - BROWSE_CHUNK_MAX_LENGTH=4000
This way, we can avoid errors of exceeding chunk size when using gpt-3.5
  • Loading branch information
itaihochman committed Apr 18, 2023
1 parent 67846ba commit e34ede7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogpt/processing/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def summarize_text(
print(f"Text length: {text_length} characters")

summaries = []
chunks = list(split_text(text))
chunks = list(split_text(text, CFG.browse_chunk_max_length))
scroll_ratio = 1 / len(chunks)

for i, chunk in enumerate(chunks):
Expand Down

0 comments on commit e34ede7

Please sign in to comment.