{"id":31965114,"url":"https://github.com/studiomaxio/build-a-bot","last_synced_at":"2026-05-16T00:38:12.827Z","repository":{"id":186885537,"uuid":"666103051","full_name":"StudioMaxIO/build-a-bot","owner":"StudioMaxIO","description":"Custom GPT bot template","archived":false,"fork":false,"pushed_at":"2023-08-11T15:44:53.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-08-11T22:47:34.055Z","etag":null,"topics":["ai","chatbot","chatgpt","gpt","gpt-4","gpt-4-api","openai","openai-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StudioMaxIO.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}},"created_at":"2023-07-13T18:06:43.000Z","updated_at":"2023-08-09T01:42:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f76e3f45-26dc-4ec9-a7d2-0a0b2f77c0e4","html_url":"https://github.com/StudioMaxIO/build-a-bot","commit_stats":null,"previous_names":["studiomaxio/build-a-bot"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/StudioMaxIO/build-a-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioMaxIO%2Fbuild-a-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioMaxIO%2Fbuild-a-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioMaxIO%2Fbuild-a-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioMaxIO%2Fbuild-a-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StudioMaxIO","download_url":"https://codeload.github.com/StudioMaxIO/build-a-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StudioMaxIO%2Fbuild-a-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020081,"owners_count":26086806,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","chatbot","chatgpt","gpt","gpt-4","gpt-4-api","openai","openai-api"],"created_at":"2025-10-14T17:40:50.067Z","updated_at":"2025-10-14T17:40:54.346Z","avatar_url":"https://github.com/StudioMaxIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖💬 Build-a-Bot 🤖💬\n\n### _Quickly prototype custom chatbots connected to OpenAI's API._\n\n## Quick Start\n\nCreate a `.env.local` file in the root of the project and add the following, replacing `\u003cYOUR_API_KEY\u003e` with your actual OpenAI API key.\n\n```bash\necho \"OPENAI_API_KEY=\u003cYOUR_API_KEY\u003e\" .env.local\n```\n\nInstall dependencies:\n\n```bash\nnpm install\n# or\nyarn\n```\n\nStart the local development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser to start interacting with your chatbot(s).\n\n## Creating a Custom Chatbot\n\n### Create a New Bot File\n\nCopy `Template.js` in the `bots` directory and rename it something useful, e.g. `CareerCoach.js` or `CustomerSupport.js`. Replace `YourBot.js` with the name of your bot file.\n\n```bash\ncp bots/Template.js bots/YourBot.js\n```\n\n### Customize Your Bot\n\n```javascript\nimport GPTBot from \"./GPTBot\";\nimport { functions } from \"../botFunctions\";\n\nclass YourBot extends GPTBot {\n  constructor() {\n    // Change the name of your bot here. This is how it will be referenced throughout the app.\n    // Second argument is the default temperature to use for this bot.\n    super(\"YourBot\", 0.2);\n    // You can also set the temperature with the temperatureDefault property.\n    this.temperatureDefault = 0.2;\n    // Set the system message to describe your bot.\n    this.setSystemMessage(`You are a template of a GPT chatbot...`);\n    // Add functions from botFunctions.js\n    this.accessFunctions([functions.getCurrentDate]);\n    // Add custom functions\n    this.addFunction(\n      yourFunction,\n      \"yourFunction\",\n      \"Description of yourFunction\",\n      {\n        type: \"object\",\n        properties: {\n          // Add parameters. if none, pass empty object\n          someInput: {\n            type: \"string\",\n            description: \"Some input to yourFunction\"\n          },\n          someOtherInput: {\n            type: \"string\",\n            description: \"Some other input to yourFunction\",\n            enum: [\"option1\", \"option2\", \"option3\"] // can be used to limit input to a set of options\n          },\n          someOptionalInput: {\n            type: \"string\",\n            description: \"Some optional input to yourFunction\"\n          }\n        },\n        required: [\"someInput\", \"someOtherInput\"] // Add required parameters here\n      }\n    );\n  }\n}\n\nfunction yourFunction(args) {\n  // Add function logic here\n  console.log(\"yourFunction called with args:\", args);\n  const response = {\n    output: \"Hello World!\"\n  };\n  // Should always return a string. Objects can be stringified.\n  return JSON.stringify(response, null, 2);\n}\n\nexport default YourBot;\n```\n\n### Import Your Chatbot\n\nOpen `pages/index.js` and import your bot:\n\n```javascript\n// index.js\nimport Chat from \"../components/Chat\";\nimport React, { useState } from \"react\";\nimport YourBot from \"../bots/Template\";\n\nconst ChatBot = ({}) =\u003e {\n  const [view, setView] = useState(\"YourBot\");\n\n  const yourBot = new YourBot();\n\n  const renderView = () =\u003e {\n    switch (view) {\n      case \"YourBot\":\n      default:\n        return \u003cChat chatBot={yourBot} /\u003e;\n    }\n  };\n\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cheader className=\"App-header\"\u003e\n        \u003cnav\u003e\n          \u003cbutton onClick={() =\u003e setView(\"YourBot\")}\u003eYour Bot\u003c/button\u003e\n        \u003c/nav\u003e\n        {renderView()}\n      \u003c/header\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default ChatBot;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudiomaxio%2Fbuild-a-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudiomaxio%2Fbuild-a-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudiomaxio%2Fbuild-a-bot/lists"}