{"id":19998311,"url":"https://github.com/szilvia-csernus/command-line-chatbot","last_synced_at":"2025-06-26T20:02:24.495Z","repository":{"id":241947540,"uuid":"808265436","full_name":"szilvia-csernus/command-line-chatbot","owner":"szilvia-csernus","description":"Basic command line chatbot, written in Python, using the OpenAI ChatGPT-3.5-turbo LLM API.","archived":false,"fork":false,"pushed_at":"2024-07-06T02:13:18.000Z","size":92,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T23:11:30.496Z","etag":null,"topics":["openai-api","python"],"latest_commit_sha":null,"homepage":"","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/szilvia-csernus.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-05-30T17:57:49.000Z","updated_at":"2024-12-08T19:57:32.000Z","dependencies_parsed_at":"2024-05-30T21:47:24.776Z","dependency_job_id":"fea1d0fc-5eb7-46e6-9a9c-910918169101","html_url":"https://github.com/szilvia-csernus/command-line-chatbot","commit_stats":null,"previous_names":["szilvia-csernus/command-line-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/szilvia-csernus/command-line-chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szilvia-csernus%2Fcommand-line-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szilvia-csernus%2Fcommand-line-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szilvia-csernus%2Fcommand-line-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szilvia-csernus%2Fcommand-line-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szilvia-csernus","download_url":"https://codeload.github.com/szilvia-csernus/command-line-chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szilvia-csernus%2Fcommand-line-chatbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262136911,"owners_count":23264659,"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":["openai-api","python"],"created_at":"2024-11-13T05:08:03.575Z","updated_at":"2025-06-26T20:02:24.391Z","avatar_url":"https://github.com/szilvia-csernus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chatbot\n\nCommand line chatbot, written in Python, using the OpenAI ChatGPT 3.5-turbo LLM.\n\n* Personality: Childish\n![Chatbot-childish](chatbot-childish.png)\n\n* Personality: Rude\n![Chatbot-rude](chatbot-rude.png)\n\n* Personality: Nice, Helpful (Default)\n![Chatbot-helpful](chatbot-helpful.png)\n\n\nThe maximum token number is set to 50, which can be changed in the code.\n\n---\n\n## How to run this project?\n\n\n0. Prerequisites: \n\n    - Make sure Python3 is installed.\n    - If you don't have an account with OpenAI, create one here: https://openai.com/\n    - Create a project API key under Dashboard / API keys\n\n1. Clone the project.\n\n2. Create a virtual environment inside the project folder:\n\n    `python -m venv venv`\n\n3. Activate the virtual environment:\n\n\n    Mac: `source venv/bin/activate`\n\n\n    Windows: `venv\\Scripts\\activate`\n\n\n4. Create an `.env` file in the root folder and add your project's API key:\n\n    `OPENAI_API_KEY=your-unique-opanai-project-key`\n\n\n5. Install the python dependencies:\n\n    `pip install -r requirements.txt`\n\n\n6. Run the project:\n\n    - with default personality (nice, helpful): `python chatbot.py`\n    - with the personality flag: `python chatbot.py --personality \"childish\"`\n\n\n## Credit\n\nThis project was adopted from Colt Steele's Walkthrough project on Udemy: [Mastering OpenAI Python APIs](https://www.udemy.com/course/mastering-openai/?couponCode=24T3MT53024).\n\nChanges made: API calls have been updated as per the latest documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszilvia-csernus%2Fcommand-line-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszilvia-csernus%2Fcommand-line-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszilvia-csernus%2Fcommand-line-chatbot/lists"}