{"id":19358380,"url":"https://github.com/paritytech/chatbot","last_synced_at":"2025-08-10T03:09:30.953Z","repository":{"id":191654922,"uuid":"638548252","full_name":"paritytech/chatbot","owner":"paritytech","description":"Polkadot ChatBot","archived":false,"fork":false,"pushed_at":"2024-09-26T18:50:57.000Z","size":50806,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-10T00:35:35.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://chatbot-production-04a2.up.railway.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-09T15:28:24.000Z","updated_at":"2025-04-09T10:25:07.000Z","dependencies_parsed_at":"2023-08-31T00:30:03.598Z","dependency_job_id":"ef997446-2755-44a9-b2c2-42a37c670563","html_url":"https://github.com/paritytech/chatbot","commit_stats":null,"previous_names":["paritytech/chatbot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paritytech/chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fchatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fchatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fchatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fchatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fchatbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269669133,"owners_count":24456603,"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-08-10T02:00:08.965Z","response_time":71,"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":[],"created_at":"2024-11-10T07:11:30.177Z","updated_at":"2025-08-10T03:09:30.925Z","avatar_url":"https://github.com/paritytech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatBot\n\nThis is an interactive AI-based tool designed to answer questions about Substrate and related technologies. It leverages OpenAI's GPT models and the data in Substrate's GitHub repositories along with the documentation to provide accurate, context-aware responses to user queries.\n\n[![Substrate](https://img.shields.io/badge/Substrate-100000?style=flat\u0026logo=polkadot\u0026logoColor=E6007A\u0026labelColor=000000\u0026color=21CC85)](https://github.com/paritytech/substrate)\n[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## How to setup the project\n\nFirst run `npm install` from the root of the project to download all of the project dependencies.\n\nAfter this, you need to ensure that you have the necessary environment variables set up. The project comes with a sample environment variable file, `example.env`, which you can use as a template. You can copy it to `.env` and fill in the necessary values.\n\nThe environment file needs to have the following values:\n\n```env\nREPO=\u003crepo-name\u003e\nORG=paritytech\nGITHUB_TOKEN=\u003ctoken-with-repo-access\u003e\nOPENAI_API_KEY=\u003capi-key\u003e\n```\n\nFor example, if you are creating an interactive chatbot for Polkadot, you would set the following values:\n\n```env\nREPO=polkadot-wiki\nORG=w3f\n```\n\nYou also need to include your OpenAI API key. You can get one by signing up for an account at [OpenAI](https://openai.com/). You also require a **GitHub token** with repo access. You can create one by following the instructions [here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). Add them to your `.env` file with the following keys:\n\n```env\nGITHUB_TOKEN=\nOPENAI_API_KEY=\n```\n\nOnce that is all completed, you can run the following command to download all the necessary files and generate the embeddings:\n\n```bash\nnpm run setup\n```\n\nThis will fetch all the docs from GitHub, generate a combined file and create an [Assistant](https://platform.openai.com/docs/assistants/overview).\nThis assistant will be feed the combined file(s) that will use as its knowledge surce.\n\nOnce the process is done, an assistant ID will be produced. _Store this ID under the variable `ASSISTANT_ID`_.\n\n## Run server\n\nYou can run the web server to ask questions. For this you need to run the following command.\n\nIn order, run in the root directory the following commands:\n\n```bash\nnpm run dev\n```\n\nThis will build your project and make it available at http://localhost:5173\n\n## Run CLI\n\nIf you don't require a web server and just want to interact from your terminal, you can use the available Command Line Interface.\n\nCreate an env file:\n\n```env\nOPENAI_API_KEY=\u003capi-key\u003e\n```\n\nRun `npm run ask`\n\nBefore running this command, please make sure that the embeddings were generated in the previous step.\n\nThe chatbot will ask you to enter a question. Once you enter a question, it will query the OpenAI API and return the most relevant answer. You can run this command again to ask another question.\n\n## License\n\nThis project is licensed under the Apache-2.0 License. For more details, see the [LICENSE](LICENSE) file.\n\n## Acknowledgements\n\nThis project is the result of conversations and code experimentation between Javier Bullrich (@Bullrich) and Ben Greenberg (@hummusonrails). We would also like to acknowledge Kian Paimani (@kianenigma) and Daan van der Plas (@Daanvdplas) for their thoughts and contributions to this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fchatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fchatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fchatbot/lists"}