{"id":15024910,"url":"https://github.com/datumbrain/openai-flask-starter","last_synced_at":"2026-02-08T13:08:01.560Z","repository":{"id":256744255,"uuid":"856295511","full_name":"datumbrain/openai-flask-starter","owner":"datumbrain","description":"Starter project with OpenAI + Flask and template HTML.","archived":false,"fork":false,"pushed_at":"2024-09-13T19:09:47.000Z","size":400,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T00:08:52.834Z","etag":null,"topics":["chatbot","conversational-agent","conversational-agents","conversational-bot","conversational-bots","flask","gpt","openai","python"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datumbrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-09-12T10:35:10.000Z","updated_at":"2025-01-21T04:14:47.000Z","dependencies_parsed_at":"2024-12-19T04:11:12.821Z","dependency_job_id":"e5a49651-5652-406d-b333-fc9b5b437baa","html_url":"https://github.com/datumbrain/openai-flask-starter","commit_stats":null,"previous_names":["datumbrain/openai-flask-starter"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datumbrain%2Fopenai-flask-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datumbrain%2Fopenai-flask-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datumbrain%2Fopenai-flask-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datumbrain%2Fopenai-flask-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datumbrain","download_url":"https://codeload.github.com/datumbrain/openai-flask-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399884,"owners_count":20932880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chatbot","conversational-agent","conversational-agents","conversational-bot","conversational-bots","flask","gpt","openai","python"],"created_at":"2024-09-24T20:01:09.593Z","updated_at":"2026-02-08T13:08:00.749Z","avatar_url":"https://github.com/datumbrain.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Flask Starter\n\n![Banner Page Picture](./banner.png)\n\nThis project demonstrates how to create a simple AI chatbot using Python, Flask, and OpenAI's Large Language Model (LLM) API. The chatbot generates human-like responses powered by GPT-4 (or GPT-3.5).\n\n## Features\n\n- **Chatbot**: Conversational AI powered by OpenAI's GPT models.\n- **Web Interface**: Built using Flask to interact with the bot via a browser.\n- **OpenAI Integration**: Utilizes the latest OpenAI API for chat completions.\n- **Docker Support**: Ready for containerization with a `Dockerfile` and `docker-compose` setup.\n- **Easy Setup**: Uses Python's built-in virtual environment.\n\n## Prerequisites\n\n- Python 3.7+\n- OpenAI API key. You can get it [here](https://beta.openai.com/signup/).\n\n## Installation\n\n1. **Clone the Repository**:\n\n   ```bash\n   git clone https://github.com/datumbrain/openai-flask-starter.git\n   cd openai-flask-starter\n   ```\n\n2. **Set Up Virtual Environment**:\n\n   Create a virtual environment and activate it:\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. **Install Dependencies**:\n\n   Install the required packages using `requirements.txt`:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Set Up Your OpenAI API Key**:\n\n   Add your OpenAI API key in `.env.sample` and rename the file to `.env`:\n\n   ```bash\n   OPENAI_API_KEY=your-api-key-here\n   HTTP_PORT=5899    # change it as you like\n   ```\n\n5. **Run the Flask Application**:\n\n   Start the Flask app by running:\n\n   ```bash\n   python main.py\n   ```\n\n   The app will be available at `http://127.0.0.1:5899/`.\n\n## Docker Setup (Optional)\n\nYou can run the project in a Docker container using the following steps:\n\n1. **Build the Docker Image**:\n\n   ```bash\n   docker-compose build\n   ```\n\n2. **Run the Application**:\n\n   ```bash\n   docker-compose up\n   ```\n\n   The app will be available at `http://127.0.0.1:5899/`.\n\n## Project Structure\n\n```raw\n.\n├── .dockerignore           # Files to ignore in Docker context\n├── .env.sample             # Environment variable example file\n├── .gitignore              # Files to ignore in git\n├── Dockerfile              # Docker image setup\n├── LICENSE                 # License information\n├── README.md               # Project documentation\n├── docker-compose.yml      # Docker Compose configuration\n├── main.py                 # Flask server and chatbot logic\n├── requirements.txt        # Project dependencies\n└── templates/\n    ├── index.html          # Frontend HTML for interacting with the chatbot\n    └── styles/\n        └── custom.css      # custom CSS styling\n```\n\n## Usage\n\nOnce the app is running, open your browser and go to `http://127.0.0.1:5899/`. Type a message in the input box, and the chatbot will respond using the GPT-4 model.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatumbrain%2Fopenai-flask-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatumbrain%2Fopenai-flask-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatumbrain%2Fopenai-flask-starter/lists"}