https://github.com/apify/chat-with-a-website
A simple app that lets you chat with a given website.
https://github.com/apify/chat-with-a-website
Last synced: 8 months ago
JSON representation
A simple app that lets you chat with a given website.
- Host: GitHub
- URL: https://github.com/apify/chat-with-a-website
- Owner: apify
- Created: 2023-08-17T13:13:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T05:20:04.000Z (over 2 years ago)
- Last Synced: 2024-12-24T22:36:36.601Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat with a website
Chat with a website using Apify and ChatGPT.
## Setup
Before getting started, be sure to sign up for an [Apify](https://console.apify.com/sign-up) and [OpenAI](https://openai.com/) account and create API keys.
To set up and run this project, follow these steps:
1. Install the required packages with `pip`:
```
pip install -r requirements.txt
```
2. Rename the `.env.example` file to `.env` and replace the variables. Here's an explanation of the variables in the .env file:
`OPENAI_API_KEY`: Your OpenAI API key. You can obtain it from your OpenAI account dashboard.
`APIFY_API_TOKEN`: Your Apify API token. You can obtain it from [Apify settings](https://console.apify.com/account/integrations).
`WEBSITE_URL`: The full URL of the website you'd like to chat with.
3. Run the `scrape.py` script to scrape the website's data using Apify's [Website content crawler](https://apify.com/apify/website-content-crawler).
4. Run the Streamlit chat app, which should default to `http://localhost:8501` and allow you to chat with the website:
```
streamlit run chat.py
```