gptnews

所属分类:特征抽取
开发工具:Python
文件大小:6KB
下载次数:0
上传日期:2023-03-28 13:22:39
上 传 者sh-1993
说明:  使用GPT汇总新闻馈送。使用GPT-4编写。
(Summarizes newsfeeds using GPT. Written with GPT-4.)

文件列表:
LICENSE (7048, 2023-03-28)
app.py (3733, 2023-03-28)

# gptnews Summarizes newsfeeds using GPT. Written with GPT-4. This was created with the assistance of GPT-4 to help me summarize newsfeeds I'm interested in. It could probably use some improvements, but I thought this was a good starting point. The big thing it could use is something to remember what it has previously summarized, so that it doesn't keep going back to the GPT API and running up fees... To get this working: 1) Install dependencies: pip install Flask feedparser beautifulsoup4 requests openai transformers 2) Find this line in app.py: openai.api_key = "PUT YOUR KEY HERE" ...replace the key with your own OpenAI API secret key. 3) run the script: python3 app.py 4) connect to your local machine via your webbrowser -- by default this will be http://127.0.0.1:5000/ Have fun! Find me here: https://twitter.com/jradoff https://linkedin.com/in/jonradoff https://linktr.ee/metavert --- background --- If you want to try the same prompts I did: 1) Choose GPT-4 in ChatGPT 2) Initial prompt: Screenshot 2023-03-28 at 9 17 25 AM How can I create a webpage that automatically observes several blogs and news feeds I care about, and summarizes the articles using GPT? I need something that gives me a daily summary of news I should care about most. [...] Screenshot 2023-03-28 at 9 17 39 AM can you give me a version of the above code that is implemented with Flask? 3) I had to address a couple errors; here's what I also prompted along the way: Screenshot 2023-03-28 at 9 17 49 AM I tried this but I'm getting some errors that look like this (ai.googleblog.com is an RSS feed I pointed at) Error extracting content from http://ai.googleblog.com/2023/03/presto-multilingual-dataset-for-parsing.html: 'NoneType' object has no attribute 'text' What should I fix? 4) The Google blog was failing with an error, so I got some extra help to handle this case: Screenshot 2023-03-28 at 9 18 02 AM How can I deal with this error? openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens, however you requested 4151 tokens (4101 in your prompt; 50 for the completion). Please reduce your prompt; or completion length. ...everything basically worked after the suggested changes from ChatGPT.

近期下载者

相关文件


收藏者