scottleibrand / gpt-summarizer

Extract text from PDF, summarize each section w/ GPT, and provide a summarized outline of the paper
MIT License
189 stars 27 forks source link

Output in other languages #3

Closed okneze closed 1 year ago

okneze commented 1 year ago

Hey there,

again, thanks for this great script!

Just want to share what I did to have the output in other language (for me in german)

I just changed 6 locations of "Please provide a detailed summary of the" into "Please provide a detailed summary in german of the" in lines 451, 520 and 584

Perhaps you can build this into the script as a parameter....

Many greetings from germany

Olli

scottleibrand commented 1 year ago

Nice! I was expecting to hear that you had prompted it with something like “Bitte geben Sie eine detaillierte Zusammenfassung der”, but if asking in English for a summary in German works just as well, then we could easily add a command-line language selector flag and include that into the English prompt like you did manually, if present.

You could probably even get ChatGPT to do it for you, if you’d like to PR the change. Labeling this as a good first issue to see if someone wants to pick that up and try it.

scottleibrand commented 1 year ago

Good work, thanks! I also updated the README to indicate how to use the new language selection feature.