diff --git a/.env.example b/.env.example index bcbc416..3778f3b 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ -export NEXT_PUBLIC_OPENAI_API_KEY= -export NEXT_PUBLIC_SERPAPI_API_KEY= -export NEXT_PUBLIC_ACTIVELOOP_API_KEY= +export OPENAI_API_KEY= +export SERPAPI_API_KEY= +export ACTIVELOOP_API_KEY= export FLASK_CONFIG= export PINECONE_API_KEY= export PINECONE_ENV= diff --git a/README.md b/README.md index f72c236..d957118 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,32 @@ -# ETH TOKYO TPAIN GPT PYTHON BACKEND +# ChadGPT Backend -## Setup +**WARNING THIS REPO HAS TONS OF ISSUES AND IS NOT SAFE TO USE FOR PRODUCTION** -Clone the repository: +Backend for ChadGPT - ETH Tokyo Hackathon -```zsh -git clone https://github.com/your-username/your-repo-name.git -``` +This project is the backend for ChadGPT, which was created during the ETH Tokyo Hackathon in 36 hours. The backend is designed to support the ChadGPT application, an innovative solution for using AI to help with coding and finding bugs, with a focus on smart contracts. + +[ETH Global ChadGPT showcase](https://ethglobal.com/showcase/chadgpt-kikng) + +Thank you to [Filecoin FVM](https://fvm.filecoin.io/) for awarding us with a prize! + +## Getting Started + +These instructions will help you set up the project on your local machine for development and testing purposes. See the deployment section for notes on how to deploy the project on a live system. + +### Prerequisites + +To run the backend, you will need: + +- Python >=3.9 +- Docker (optional) + +### Installing + +Clone the repository: ```zsh -cd your-repo-name +git clone https://github.com/kevin-fruitful/chadgpt-backend.git ``` Create and activate a virtual environment: @@ -20,28 +37,60 @@ source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows ``` -Install the dependencies: +Install the required packages: ```zsh pip install -r requirements.txt ``` -### Run the application +Set up the environment variables: ```zsh -python app.py +OPENAI_API_KEY= ``` -Now, the backend is running on `http://127.0.0.1:5000/` +Run the backend locally: -### Docker / DigitalOcean hosting +```zsh +flask run --port 8000 +``` -Our backend is hosted at `http://64.226.69.24` +or ```zsh -docker run -d -p 80:5000 --name practical_mcclintock your-image-name +python app.py ``` +Your backend should now be running at `http://localhost:8000`. + +## Deployment + +To deploy the backend, containerize it using Docker and deploy it on your preferred cloud provider or VPS. See the [Docker documentation](https://docs.docker.com/) and the specific cloud provider's documentation for more details on how to deploy the Docker container. + +## Built With + +- [Flask](https://flask.palletsprojects.com/) - The web framework used +- [LangChain SDK](https://github.com/hwchase17/langchain) + +## ETH Tokyo ChadGPT Team + +[Kevin Park](https://github.com/kevin-fruitful) [@kevin-fruitful](https://github.com/kevin-fruitful) +[Ariel Chen](https://github.com/Arielpopcorn) [@Arielpopcorn](https://github.com/Arielpopcorn) +[Caitlin Zhang](https://github.com/caitlinthebest) [@caitlinthebest](https://github.com/caitlinthebest) +[Tesa Ho](https://github.com/tesaho) [@tesaho](https://github.com/tesaho) +[Tim Cox](https://github.com/timncox) [@timncox](https://github.com/timncox) + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/yourusername/projectname/blob/master/LICENSE.md) file for details. + +## Acknowledgments + +- The ETH Tokyo Hackathon organizers and sponsors for providing the opportunity to build this project. +- The amazing mentors and fellow participants at ETH Tokyo for their support and collaboration. +-- Special shoutout to [Jeff Lau](https://github.com/jefflau) [@jefflau](https://github.com/jefflau) +- Everyone who has contributed to the open-source tools and libraries used in this project. + ### Notes After installing dependencies, add them to `requirements.txt`