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

How to work with maximum context length is 2049 tokens? #46

Closed
SeaDude opened this issue Nov 22, 2021 · 2 comments
Closed

How to work with maximum context length is 2049 tokens? #46

SeaDude opened this issue Nov 22, 2021 · 2 comments

Comments

@SeaDude
Copy link

SeaDude commented Nov 22, 2021

I'd like to send the OpenAI's API, the text from various PDF's. Specifically, the Summarize for a 2nd grader or the TL;DR summarization API's.

I can extract the text from PDF's using PyMuPDF and prepare the OpenAI prompt.

Question: How best to prepare the prompt when the token count is longer than the allowed 2049?

  • Do I just truncate the text?
  • Or is there a way to sample the text to "compress" it to lose key points?
@SeaDude SeaDude changed the title How to work maximum context length is 2049 tokens? How to work with maximum context length is 2049 tokens? Nov 22, 2021
@sagar1025
Copy link

Try the Openai Forums

@hallacy
Copy link
Collaborator

hallacy commented Jan 4, 2022

Hi @SeaDude, thanks for the issue! I'd agree with @sagar1025. Please check out the forums and let support@openai.com know if you have any issues

@hallacy hallacy closed this as completed Jan 4, 2022
baseprime pushed a commit to breezerfp/breeze-openai that referenced this issue Mar 20, 2024
* Revamp cli args (openai#45)

* Rachel/follow (openai#46)

* Add fine_tunes.follow. Add better error handling for disconnected streams

* return early

* fix an oops

* lint

* Nicer strings

* ensure end token is not applied to classification (openai#44)

* ensure end token is not applied to classification

* black

Co-authored-by: Boris Power <81998504+BorisPower@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants