Skip to content

Commit c739a5e

Browse files
committedAug 3, 2024
prevents overlap in prompt
1 parent f150443 commit c739a5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎text_chunker_app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def process_text(text):
6060
response_model=TextChunks,
6161
messages=[
6262
{"role": "system", "content": "You are an AI assistant tasked with chunking a text into cohesive sections. Your goal is to create chunks that maintain topic coherence and context."},
63-
{"role": "user", "content": f"Here's a text with numbered artifacts. Determine the best chunks by specifying start and end artifact numbers. Make the chunks as large as possible while maintaining coherence. Provide a thorough context for each chunk, including information from the rest of the text to ensure the chunk makes good sense. Here's the text:\n\n{text_with_artifacts}"}
63+
{"role": "user", "content": f"Here's a text with numbered artifacts. Determine the best chunks by specifying start and end artifact numbers. Make the chunks as large as possible while maintaining coherence. Provide a thorough context for each chunk, including information from the rest of the text to ensure the chunk makes good sense. Ensure no overlap between chunks, and also not gaps. the end of one chunk should be the start of the next. Here's the text:\n\n{text_with_artifacts}"}
6464
]
6565
)
6666
except RateLimitException:

0 commit comments

Comments
 (0)