Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chunksize updated to 3000 from 10000" #310

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/transcript_summarizer_aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def num_tokens_from_string(string: str, encoding_name="cl100k_base") -> int:

ChatGPT models have a token limit. For GPT3.5-turbo, the limit is 4096 tokens [(docs)](https://platform.openai.com/docs/models/gpt-3-5). Most transcripts exceed that, so it must be split into chunks.
"""
def transcript_splitter(raw_transcript, chunk_size=10000, chunk_overlap=200):
def transcript_splitter(raw_transcript, chunk_size=3000, chunk_overlap=200):
markdown_splitter = MarkdownTextSplitter(
chunk_size=chunk_size, chunk_overlap=chunk_overlap)
transcript_docs = markdown_splitter.create_documents([raw_transcript])
Expand Down