{"id":18655795,"url":"https://github.com/jezbravo/django-chatbot","last_synced_at":"2026-04-11T14:31:08.422Z","repository":{"id":239533769,"uuid":"772798960","full_name":"jezbravo/django-chatbot","owner":"jezbravo","description":"ChatGPT Clone","archived":false,"fork":false,"pushed_at":"2024-05-13T04:48:13.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T14:40:55.070Z","etag":null,"topics":["ai","chatbot","chatgpt","css","django","gemini","gemini-api","gemini-pro","html","postgresql","python","railway"],"latest_commit_sha":null,"homepage":"https://django-chatbot-production.up.railway.app/login","language":"Python","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/jezbravo.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}},"created_at":"2024-03-15T23:32:44.000Z","updated_at":"2024-05-19T05:45:48.000Z","dependencies_parsed_at":"2024-05-13T06:51:56.555Z","dependency_job_id":null,"html_url":"https://github.com/jezbravo/django-chatbot","commit_stats":null,"previous_names":["jezbravo/django-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jezbravo%2Fdjango-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jezbravo%2Fdjango-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jezbravo%2Fdjango-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jezbravo%2Fdjango-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jezbravo","download_url":"https://codeload.github.com/jezbravo/django-chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239470590,"owners_count":19644154,"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":["ai","chatbot","chatgpt","css","django","gemini","gemini-api","gemini-pro","html","postgresql","python","railway"],"created_at":"2024-11-07T07:20:08.556Z","updated_at":"2025-12-30T22:17:37.925Z","avatar_url":"https://github.com/jezbravo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DJANGO CHATBOT\n\n## Description\n\nThis is a general-purpose chatbot application, similar to Open AI's famous ChatGPT, but instead uses Google's Gemini 1.0 Pro model. It also has the advantage of being able to be configured to provide personalized responses.\n\n### Stack\n\n- HTML\n- CSS\n- Django\n- PostrgeSQL\n- Railway\n\n## Setup\n\nFirst of all you must clone the repository:\n\n```sh\ngit clone https://github.com/jezbravo/django-chatbot.git\ncd django-chatbot\n```\n\nCreate a virtual environment to install dependencies in and activate it:\n\n```python\npython.exe -m venv venv\n.\\venv\\Scripts\\activate\n```\n\nThen install the dependencies:\n\n```python\n(venv)pip install -r requirements.txt\n```\n\nNote the `(venv)` in front of the prompt. This indicates that this terminal session operates in a virtual environment set up by \"venv\".\n\n### Environment Variables\n\nTo make the program work, it is necessary to configure the following environment variables in an **.env** file at the root of the project:\n\n```python\nSECRET_KEY=\nGENAI_API_KEY=\nDATABASE_URL=\n```\n\nThe `SECRET_KEY` is the Django project key and can be generated by:\n\n```python\n(venv)python.exe .\\manage.py shell\n\nfrom django.core.management.utils import get_random_secret_key\nprint(get_random_secret_key())\n```\n\nThe `GENAI_API_KEY` and the `DATABASE_URL` are provided by the Google API and by the database service (in this case, PostgreSQL) respectively.\n\n### Database configuration\n\nPerform the migration of the tables:\n\n```python\n(venv)python.exe .\\manage.py migrate\n```\n\nOnce everything is ready:\n\n```python\n(venv)python.exe .\\manage.py runserver\n```\n\nAnd navigate to: http://localhost:8000/login\n\n## Additional settings\n\n### Administrator credentials\n\nRun the following command:\n\n```python\n(venv)python.exe .\\manage.py createsuperuser\n```\n\nand follow the instructions. Then navigate to: http://localhost:8000/admin and log in to manage the project from the Django administration panel.\n\n### AI Assistant Name and Custom Responses\n\nIn the **views.py** file from \"chatbot\" folder, edit the ask_genai function, for example:\n\n```python\n   {\n        \"role\": \"user\",\n        \"parts\": [\"You are an AI virtual assistant. Your name is Luna.\"]\n    },\n```\n\n## Walkthrough\n\nThere are two simple login and register templates to access the chat page. Once inside, the virtual assistant will answer all questions and each user's conversation history will be stored privately so they can consult it.\nYou can test a version deployed to production at the following link: https://django-chatbot-production.up.railway.app/login\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjezbravo%2Fdjango-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjezbravo%2Fdjango-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjezbravo%2Fdjango-chatbot/lists"}