{"id":27249762,"url":"https://github.com/leonsilva15/openai-chatbot","last_synced_at":"2026-04-28T16:06:45.140Z","repository":{"id":196902515,"uuid":"697363298","full_name":"LeonSilva15/openai-chatbot","owner":"LeonSilva15","description":"Chatbot created using the OpenAI API","archived":false,"fork":false,"pushed_at":"2025-01-28T06:43:01.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-19T07:03:42.222Z","etag":null,"topics":["chatbot","flask","mysql","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeonSilva15.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,"zenodo":null}},"created_at":"2023-09-27T15:18:29.000Z","updated_at":"2025-01-28T06:43:05.000Z","dependencies_parsed_at":"2024-04-21T21:41:08.096Z","dependency_job_id":"db545afb-2fa9-4c55-8031-f164d6ca87b7","html_url":"https://github.com/LeonSilva15/openai-chatbot","commit_stats":null,"previous_names":["leonsilva15/openai-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LeonSilva15/openai-chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonSilva15%2Fopenai-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonSilva15%2Fopenai-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonSilva15%2Fopenai-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonSilva15%2Fopenai-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeonSilva15","download_url":"https://codeload.github.com/LeonSilva15/openai-chatbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonSilva15%2Fopenai-chatbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"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":["chatbot","flask","mysql","openai","python"],"created_at":"2025-04-11T00:31:48.545Z","updated_at":"2026-04-28T16:06:45.112Z","avatar_url":"https://github.com/LeonSilva15.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Chatbot\n\nThis is a chatbot created using the OpenAI API, Flask and MySQL\n\n## Prerequisites\n| Dependency | Documentation | MacOS Installation |\n| ------ | ------ | ----- |\n| Venv | https://docs.python.org/3/library/venv.html | https://formulae.brew.sh/formula/virtualenv |\n| Python 3.7 | https://docs.python.org/3.7/ | https://www.python.org/downloads/release/python-370/ |\n| MySQL | https://dev.mysql.com/doc/ | https://formulae.brew.sh/formula/mysql |\n\n## Installation\n### Get python 3.7 using pyenv\n```sh\nbrew update\nbrew isntall pyenv \npyenv install 3.7\npyenv shell 3.7\n```\n\u003e Useful links:\n\u003e * https://formulae.brew.sh/formula/pyenv\n\u003e * https://stackoverflow.com/questions/2547554/multiple-python-versions-on-the-same-machine \n\n### Get the virtual environment\n```sh\npip3 install virtualenv\n```\n* or\n```sh\nbrew install virtualenv\n```\n\u003e Useful link:\n\u003e * https://formulae.brew.sh/formula/virtualenv\n\u003e * https://stackoverflow.com/questions/44158676/remove-virtual-environment-created-with-venv-in-python3\n\n### Get MySQL\n```sh\nbrew install mysql\n```\n\u003e Useful link:\n\u003e * https://formulae.brew.sh/formula/mysql\n\n## Setup\n* Create the virtual environment using python 3.7\n```sh\npython -m venv .env\n```\n### Start the virtual environment\n* On MacOS (Option 1)\n```sh\nsource env/bin/activate\n```\n* On Windows\n```sh\nvenv\\Scripts\\activate.bat\n```\n* On MacOS (Option 2), Linux or Windows Git Bash\n```sh\nsource venv/Scripts/activate\n```\n### To get out from the virtual environment\n```sh\ndeactivate\n```\n### Install the requirments\n```sh\npip install -r requirements.txt\n```\n## Create the data base\nUsed for users management and chat recording\n### Start mysql\n```sh\nbrew services start mysql\n```\n* To stop it\n```sh\nbrew services stop mysql\n```\n### Enter mysql\n```sh\nmysql -u root\n```\n* To get out from mysql\n```sh\nquit();\n```\n### Create the dabase\n```sh\ncreate database chatbot;\n```\n### Get in the chatbot database\n```sh\nuse chatbot\n```\n### Create the users table\n```sh\nCREATE TABLE `users` (\n    `id` int(11) NOT NULL,\n    `name` varchar(100) NOT NULL,\n    `password` varchar(255) NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\nALTER TABLE `users`\n    ADD PRIMARY KEY (`id`);\n\nALTER TABLE `users`\n    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n```\n### Create the chats table\n```sh\nCREATE TABLE `chats` (\n  `id` varchar(100) NOT NULL,\n  `question` varchar(255) NOT NULL,\n  `answer` LONGTEXT NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n```\n## Add the environment variables\n```\nDB_HOST=localhost\nDB_USER=root\nDB_PASSWORD=\nDB_DB=chatbot\nSECRET_KEY=\u003cAny random string\u003e\nAPI_KEY=\u003cYour OpenAI API for gpt-3.5-turbo key\u003e\n```\n\n## Start the program\n```sh\npython3 main.py\n```\n\nGo to your web browser and open your `localhost:4000`.\nEnjoy it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonsilva15%2Fopenai-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonsilva15%2Fopenai-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonsilva15%2Fopenai-chatbot/lists"}