CosmosShadow / gptpdf

Using GPT to parse PDF
MIT License
2.76k stars 212 forks source link

Prompt error #19

Closed musitafa0032 closed 1 month ago

musitafa0032 commented 2 months ago

I used custom prompts, but it shows error as pic (I removed the keys and file path dir)

image

I checked the source code, should we add code to

if isinstance(prompt, dict) and 'prompt' in prompt:
        prompt = prompt['prompt']
        logging.info("prompt is provided, using user prompt.")
    else:
        prompt = DEFAULT_PROMPT
        logging.info("prompt is not provided, using default prompt.")
CosmosShadow commented 2 months ago

Can you request a PR ?

musitafa0032 commented 2 months ago

Can you request a PR ?

Yes! I just submitted PR. Could you please help review it? Thank you!