https://github.com/semaj87/llm-post-generator
Using LLMs & the SERP API to retrieve information on a given topic, which is then used to generate a Reddit post
https://github.com/semaj87/llm-post-generator
css generative-ai gpt-3-5-turbo langchain llms openai serpapi streamlit-webapp transformers
Last synced: 14 days ago
JSON representation
Using LLMs & the SERP API to retrieve information on a given topic, which is then used to generate a Reddit post
- Host: GitHub
- URL: https://github.com/semaj87/llm-post-generator
- Owner: semaj87
- License: mit
- Created: 2023-11-28T10:38:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T18:27:08.000Z (over 2 years ago)
- Last Synced: 2025-03-25T11:49:43.776Z (about 1 year ago)
- Topics: css, generative-ai, gpt-3-5-turbo, langchain, llms, openai, serpapi, streamlit-webapp, transformers
- Language: Python
- Homepage: https://llm-post-generator.streamlit.app/
- Size: 168 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LLM post generator
An app that uses the SERP API together with the gpt-3.5-turbo model to generate a Reddit post. This is achieved by using
LangChain and prompt templates to chain everything together, and generate the desired result.
The following process underpins the end-to-end app functionality:
* A topic of choice is entered into the web application which forms the [SERP](https://serper.dev/) query
* The next step is used to find the best URL using a prompt template and the gpt-3.5-turbo model
* Once the URL are returned, LangChain is used to fetch the data from the URL
* Then the process summarises the fetched data, using the gpt-3.5-turbo and prompt template
* Finally, LangChain and prompt templates are used in tandem with gpt-3.5-turbo to generate a Reddit post
## System design

## Models
- [gpt-3.5-turbo](https://platform.openai.com/docs/models/gpt-3-5)
## Requirements
```bash
python -m pip install -r requirements.txt
```
## Run App Locally
```bash
source build.sh
```
## Run App with Streamlit Cloud
[Launch App](https://llm-post-generator.streamlit.app/)
## License
Distributed under the MIT License. See `LICENSE` for more information.