Skip to content

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

Description

@SeaDude

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?

Activity

  1. changed the title [-]How to work maximum context length is 2049 tokens?[/-] [+]How to work with maximum context length is 2049 tokens?[/+] on Nov 22, 2021
  2. sagar1025 commented on Dec 16, 2021

    @sagar1025
  3. hallacy commented on Jan 4, 2022

    @hallacy
    Contributor

    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

  4. added a commit that references this issue on Mar 20, 2024
  5. added a commit that references this issue on Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions