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

Split summaries into Chunks #73

Closed
hatkyinc2 opened this issue Apr 12, 2023 · 4 comments
Closed

Split summaries into Chunks #73

hatkyinc2 opened this issue Apr 12, 2023 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers Short term

Comments

@hatkyinc2
Copy link
Collaborator

split the summaries into chunks up to max size and loop the chunks on prompts to ask the questions and accept an empty option

something like

MAX_CHUNK_LENGTH=1000
summary_chunks=[]

chunks=[] //summary_chunks
current_chunk=[];
current_chunk_length= 0
for (summary of summaries) {
  current_summary_length:=summaries.length()
  if current_summary_length>MAX_CHUNK_LENGTH{throw new ERROR('single summary is too big');
  if (current_chunk_length+current_summary_length) >MAX_CHUNK_LENGTH{
     chunks.push(current_chunk);
     current_chunk=[];
     current_chunk_length=0;
  }else{
    current_chunk_length=current_chunk_length+current_summary_length
    current_chunk.push(summary)
  }
}
// push last chunk

summary_chunks would have a summary split, might be one file each or might be all the files in one as now
And loop on summary_chunks and ask almost the same current prompt

@hatkyinc2 hatkyinc2 added bug Something isn't working enhancement New feature or request good first issue Good for newcomers Short term labels Apr 12, 2023
@hatkyinc2
Copy link
Collaborator Author

This especially affects first-time users and creates support tickets...
But is important both short term and long term non the less

@hatkyinc2
Copy link
Collaborator Author

#61

@hatkyinc2
Copy link
Collaborator Author

#31

@hatkyinc2
Copy link
Collaborator Author

Code done. test done. waiting for merge pipeline
hatkyinc2#43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers Short term
Projects
Status: Done
Development

No branches or pull requests

1 participant