{"id":20834788,"url":"https://github.com/promptable/chatbot_cli","last_synced_at":"2025-06-18T23:36:58.533Z","repository":{"id":63475934,"uuid":"568136654","full_name":"promptable/chatbot_cli","owner":"promptable","description":"Build chatbots with GPT3. Write a text file, get a chat bot.","archived":false,"fork":false,"pushed_at":"2022-11-19T17:52:05.000Z","size":19,"stargazers_count":16,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-08T02:03:47.898Z","etag":null,"topics":["chatbots","gpt-3","llms","nlp-machine-learning","openai","prompt-engineering","prompt-tuning","prompts"],"latest_commit_sha":null,"homepage":"https://promptable.ai","language":"Python","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/promptable.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}},"created_at":"2022-11-19T15:10:17.000Z","updated_at":"2025-01-07T21:33:39.000Z","dependencies_parsed_at":"2023-01-22T18:00:07.926Z","dependency_job_id":null,"html_url":"https://github.com/promptable/chatbot_cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchatbot_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchatbot_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchatbot_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchatbot_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/promptable","download_url":"https://codeload.github.com/promptable/chatbot_cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252983760,"owners_count":21835764,"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":["chatbots","gpt-3","llms","nlp-machine-learning","openai","prompt-engineering","prompt-tuning","prompts"],"created_at":"2024-11-18T00:20:49.190Z","updated_at":"2025-05-08T02:06:04.678Z","avatar_url":"https://github.com/promptable.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat Bot CLI\nDead simple chatbots with GPT3. Write a text file, get a chat bot.\n\nFully-customizable, bring your own prompt.\n\n## Build a new chat bot\n\nAs language models get better, designing \"apps\" on top of models like GPT3 will look more and more like writing natural language instructions or \"prompts\". Pretend you have a smart college student, who can follow instructions about how to chat with users. What would you tell them?\n\nHere, building a bot is as simple as writing a text file, with your instructions for how the bot should ask. That's it. \n\nHere are some examples:\n\n### Personal Assistant\n\nAn open-ended chat bot for talking about pretty much anything.\n\n\u003e opening_line: Hello {user_name}, how can I help you?\n\u003e \\#\\#\\#\\#\\#\\#\n\u003e \n\u003e Below is a conversation between a knowledgable, helpful, and witty AI assistant and a user, who has some questions about a topic. The AI assistant is able to answer the user's questions and provide additional information about the topic. The AI assistant is able to keep the conversation focused on the topic and provide relevant information to the user. The closer the AI agent can get to answering the user's questions, the more helpful the AI agent will be to the user.\n\u003e \n\u003e {transcript}\n\u003e Assistant:\n\n\nHere `{user_name}` is replaced with the name you pass as a CLI argument. `{transcript}` is replaced with the dialogue history.\n\n\n### Interview Bot\n\nA chat bot who gives system design interviews!\n\n\u003e System Design Interview\n\u003e \n\u003e You are a Machine Learning Engineer at at a Digital Health Startup called Bright Labs. Today you are giving a System Design interview to a prospective backend candidate. Your job is to ask the candidate a system design question and then write up feedback on the candidate to share with the hiring committee\n\u003e \n\u003e Background on you:\n\u003e You work on the machine learning stack at Bright Labs, which involves training and deployment transformer based models to provide a chat-bot like service which helps answer users health questions.\n\u003e \n\u003e Here is a snippet from the candidate's resume, so you have context and can ask some personal questions. And tailor the interview to the candidate's experiences.\n\u003e \n\u003e Candidate: {user_name}\n\u003e \n\u003e Resume:\n\u003e \n\u003e (prompt continues)\n\nSee `chatbots/interview.txt`.\n\n## Running the bot\n\nRequires Python 3.6+. Tested on Mac M1.\n\n1. Create an account with OpenAI and add your API key to `.env.secrets`\n\n2. Install python requirements.\n\n```bash\n# Ensure you're using python 3.6+\npython3 --version\n\n# Uses your default python environment\npip3 install -r requirements.txt\n\n# Alternatively, create a virtual environment (recommended)\npip3 install virtualenv\nvirtualenv .venv --python python3\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n3. Run some examples\n\n```bash\n# Run the basic assistant demo\npython cli.py --user-name Brendan --prompt-file chatbots/assistant.txt\n\n# Run the interview bot, provide a \"chat_name\" to save your history\npython cli.py --user-name Brendan --prompt-file chatbots/interview.txt --chat-name my_interview\n\n# Continue where you left off (load history), by passing in the chat_id (prints at top of dialogue)\npython cli.py --user-name Brendan --prompt-file chatbots/interview.txt --chat-id my_interview_971d58d4\n```\n\n\n## Creating a new bot\n\n1. Create a new instruction file in `chatbots/` like `chatbots/my_new_bot.txt`.\n2. Add your opening line at the top of the file, followed by 6 hashtags `######`.\n\n```txt\nopening_line: Hello, how can I help you?\n######\n\u003cinstructions here\u003e\n```\n3. Add your instructions!\n4. Add your final line, typically:\n\n```txt\n{transcript}\nYourBotName:\n```\n\nNote: you must include `{transcript}` so we know where to insert the dialogue history.\n\n4. Run your bot!\n\n```bash\npython cli.py --user-name Brendan --prompt-file chatbots/my_new_bot.txt\n```\n\nLook at some of the examples in `chatbots/` for guidance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptable%2Fchatbot_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpromptable%2Fchatbot_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptable%2Fchatbot_cli/lists"}