{"id":15116122,"url":"https://github.com/seandearnaley/reddit-gpt-summarizer","last_synced_at":"2026-04-04T17:25:35.657Z","repository":{"id":105822406,"uuid":"582983842","full_name":"seandearnaley/reddit-gpt-summarizer","owner":"seandearnaley","description":"Reddit Summarizer using LLMs OpenAI/Anthropic, Streamlit + Python","archived":false,"fork":false,"pushed_at":"2024-06-25T08:05:14.000Z","size":690,"stargazers_count":75,"open_issues_count":2,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-27T21:32:54.599Z","etag":null,"topics":["chaptgpt","gpt","praw","python","reddit","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seandearnaley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-28T12:22:59.000Z","updated_at":"2025-08-11T11:33:42.000Z","dependencies_parsed_at":"2023-11-30T01:42:57.334Z","dependency_job_id":"62f50802-95fe-4d30-9637-73d550a1eb95","html_url":"https://github.com/seandearnaley/reddit-gpt-summarizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seandearnaley/reddit-gpt-summarizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seandearnaley%2Freddit-gpt-summarizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seandearnaley%2Freddit-gpt-summarizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seandearnaley%2Freddit-gpt-summarizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seandearnaley%2Freddit-gpt-summarizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seandearnaley","download_url":"https://codeload.github.com/seandearnaley/reddit-gpt-summarizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seandearnaley%2Freddit-gpt-summarizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaptgpt","gpt","praw","python","reddit","streamlit"],"created_at":"2024-09-26T01:44:10.500Z","updated_at":"2026-04-04T17:25:35.199Z","avatar_url":"https://github.com/seandearnaley.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Reddit GPT Summarizer\r\n\r\n## 06/25/2024:\r\n\r\nUpdated to LiteLLM for openai compatible connector, makes it easier to add support for a variety of models, now we're using a single models json file for our config.  Make sure you have appropriate API keys to use Google Gemini AI Studio.  GPT 4o, Sonnet 3.5 support.\r\n\r\n## 03/15/2024:\r\n\r\nSupport for new Claude models, some tweaks throughout.\r\n\r\n## 11/23/2023:\r\n\r\nPython updated to 3.11. We've also added support for GPT-4 128k and Claude 2.1 + Claude Instant v1.2. Make sure to update your dependencies accordingly.\r\n\r\n## 7/12/2023: added support for Claude v2\r\n\r\nSee: [Anthropic/ Claude 2](https://www.anthropic.com/index/claude-2)\r\n\r\nAlso updated some dependencies (Anthropic, OpenAI, PRAW, Streamlit)\r\n\r\n## 6/13/2023: added support for new ChatGPT models (16k + 0613 models)\r\n\r\nVideo overview of updates [@YouTube](https://youtu.be/fPq6wSADgMQ)\r\n\r\nNew Article @ Better Programming/Medium: [Transforming Reddit Summarization With Claude 100k and GPT 16k](https://betterprogramming.pub/transforming-reddit-summarization-with-claude-100k-and-gpt-16k-4e2592d850cf)\r\n\r\n## 5/22/2023: added support for Anthropic models including Claude 100k + older OpenAI Instruct Models\r\n\r\nExpand settings to use Anthropic models; also added support for older OpenAI instruct models-- most produce garbage outputs but useful to test, that being said, Text Davinci 003 subjectively produces some of the highest quality outputs. The new 100k models can often consume entire reddit threads without recursion.\r\n\r\nDon't forget to add you Anthropic API key to your .env file. (ANTHROPIC_API_KEY)\r\n\r\nhttps://www.anthropic.com/index/100k-context-windows\r\n\r\n## 3/17/2023: added support for GPT-4 models\r\n\r\nIf you have access to the API, you can use the longer context windows today. See docs.\r\nhttps://platform.openai.com/docs/models/gpt-4\r\nSign up for the waitlist here: https://openai.com/waitlist/gpt-4\r\n\r\n## 3/16/2023: article\r\n\r\nArticle @ Better Programming/Medium [Building a Reddit Thread Summarizer With ChatGPT API](https://medium.com/better-programming/building-a-reddit-thread-summarizer-with-chatgpt-api-5b0dcd50b88e)\r\n\r\n## 3/1/2023: added support for official ChatGPT API and models\r\n\r\nThis is a Python-based Reddit thread summarizer that uses GPT-3 to generate summaries of the thread's comments.\r\n\r\nThis script is used to generate summaries of Reddit threads by using the OpenAI API to complete chunks of text based on a prompt with recursive summarization. It starts by making a request to a specified Reddit thread, extracting the title and self text, and then finding all of the comments in the thread.\r\n\r\nThese comments are then concatenated into groups of a specified number of tokens, and a summary is generated for each group by prompting the OpenAI API with the group's text and the title and self text of the Reddit thread. The summaries are then saved to a file in an `outputs` folder in the current working directory.\r\n\r\n![Reddit GPT Summarizer](settings.png?raw=true)\r\n\r\n## Installation\r\n\r\nTo install the dependencies, you can use `poetry`:\r\n\r\n```sh\r\npoetry install\r\n```\r\n\r\nYou'll also need to provide OpenAI/Reddit/Anthropic API credentials. Create a `.env` file and add the following:\r\n\r\n```env\r\nOPENAI_ORG_ID=YOUR_ORG_ID\r\nOPENAI_API_KEY=YOUR_API_KEY\r\nREDDIT_CLIENT_ID=YOUR_CLIENT_ID\r\nREDDIT_CLIENT_SECRET=YOUR_CLIENT_SECRET\r\nREDDIT_USERNAME=YOUR_USERNAME\r\nREDDIT_PASSWORD=YOUR_PASSWORD\r\nREDDIT_USER_AGENT=linux:com.youragent.reddit-gpt-summarizer:v1.0.0 (by /u/yourusername)\r\nANTHROPIC_API_KEY=YOUR_ANTHROPIC_KEY\r\n```\r\n\r\n## Development\r\n\r\nTo install development dependencies, run:\r\n\r\n```\r\npoetry install --extras dev\r\n```\r\n\r\nThis project uses pytest for testing and mypy for type checking.\r\n\r\nTo run tests and type checking, use the following commands:\r\n\r\n```\r\npoetry run pytest\r\npoetry run mypy .\r\n```\r\n\r\nThis project also uses black for code formatting and pylint for linting.\r\n\r\nTo format code and check for linting errors, use the following commands:\r\n\r\n```\r\npoetry run black .\r\npoetry run pylint .\r\n```\r\n\r\n## Usage\r\n\r\nTo run the app, use the following command:\r\n\r\n```sh\r\nstreamlit run app/main.py\r\n```\r\n\r\nThis will start a web app that allows you to enter a Reddit thread URL and generate a summary. The app will automatically generate prompts for GPT-3 based on the thread's contents and generate a summary based on those prompts.\r\n\r\n## Configuration\r\n\r\nYou can customize the behavior of the app using the `config.py` file. The following configuration options are available:\r\n\r\n- `ATTACH_DEBUGGER`: Whether to attach a debugger to the app.\r\n- `WAIT_FOR_CLIENT`: Whether to wait for a client to attach before starting the app.\r\n- `DEFAULT_DEBUG_PORT`: The default port to use for the debugger.\r\n- `DEBUGPY_HOST`: The host to use for the debugger.\r\n- `DEFAULT_CHUNK_TOKEN_LENGTH`: The default length of a chunk of comments.\r\n- `DEFAULT_NUMBER_OF_SUMMARIES`: The default number of summaries to generate.\r\n- `DEFAULT_MAX_TOKEN_LENGTH`: The default maximum length of a summary.\r\n- `LOG_FILE_PATH`: The path to the log file.\r\n- `LOG_COLORS`: A dictionary of colors for the log.\r\n- `REDDIT_URL`: The URL of the Reddit thread to summarize.\r\n- `TODAYS_DATE`: Today's date.\r\n- `LOG_NAME`: The name of the log file.\r\n- `APP_TITLE`: The title of the app.\r\n- `MAX_BODY_TOKEN_SIZE`: The maximum number of tokens for a comment body.\r\n- `DEFAULT_QUERY_TEXT`: The default text to use for the GPT-3 prompt.\r\n- `HELP_TEXT`: The text to display when the user hovers over the help icon.\r\n\r\n## Contributing\r\n\r\nIf you'd like to contribute to this project, please create a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT) .\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseandearnaley%2Freddit-gpt-summarizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseandearnaley%2Freddit-gpt-summarizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseandearnaley%2Freddit-gpt-summarizer/lists"}