{"id":18484399,"url":"https://github.com/giveth/giveth-docs-bot","last_synced_at":"2025-10-04T00:56:22.594Z","repository":{"id":164503274,"uuid":"639587285","full_name":"Giveth/giveth-docs-bot","owner":"Giveth","description":"Ask questions about Giveth to a bot that fetches answers directly from Giveth Docs","archived":false,"fork":false,"pushed_at":"2023-05-20T22:38:50.000Z","size":739,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-08T20:02:06.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.giveth.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Giveth.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}},"created_at":"2023-05-11T19:19:25.000Z","updated_at":"2023-06-27T11:26:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"23335930-1003-41a1-a587-447b79598bdf","html_url":"https://github.com/Giveth/giveth-docs-bot","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/Giveth%2Fgiveth-docs-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-docs-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-docs-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-docs-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Giveth","download_url":"https://codeload.github.com/Giveth/giveth-docs-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254029008,"owners_count":22002284,"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":[],"created_at":"2024-11-06T12:39:40.839Z","updated_at":"2025-10-04T00:56:17.574Z","avatar_url":"https://github.com/Giveth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Giveth Docs Bot\n\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](LICENSE)\n\nThis project allows you to ask questions about Giveth, a non-profit organization focused on blockchain-based donations and decentralized governance, by utilizing a bot which fetches answers directly from Giveth's documentation.\n\n## Requirements\n1. Python 3.7 or later.\n2. Git\n\n## Installation\n\n1. Ensure you have the required dependencies installed.\n2. Clone the repository.\n3. Install the required Python libraries by running `pip install -r requirements.txt` in the root directory of the project.\n\n## Usage\n\nThe bot is intended for use within a Discord server. Here is how you can utilize the bot's commands:\n\n- `/reload` - This command reloads the knowledge base from the Giveth's documentation.\n- `/ask \u003cyour question here\u003e` - This command fetches the answer to your question from the knowledge base. Replace `\u003cyour question here\u003e` with your actual question about Giveth.\n- `/experimental_agent \u003cyour question here\u003e - This command fetches the answer to your question using the experimental agent. Replace `\u003cyour question here\u003e` with your actual question about Giveth.\n\n## Setting up Discord Bot Token and OpenAI API Key\n\nThe bot uses Discord's token for authentication and OpenAI's API key to generate text embeddings.\n\n### Discord Token\n\nTo obtain a token, follow these steps:\n\n1. Visit the Discord Developer Portal (https://discord.com/developers/applications)\n2. Click on \"New Application\"\n3. Name your application and click \"Create\"\n4. On the left panel, click on \"Bot\"\n5. Click on \"Add Bot\"\n6. Under the bot settings, click on \"Copy\" to copy the bot token\n\n### OpenAI API Key\n\nTo obtain the OpenAI API key, follow these steps:\n\n1. Visit the OpenAI website and create an account (https://www.openai.com/)\n2. Navigate to the API section (https://platform.openai.com/account/api-keys)\n3. Generate a new key\n\nNext, create a `.env` file in the root directory of the project and paste your bot token and OpenAI API Key like this:\n\n```\nDISCORD_TOKEN=your_discord_token_here\nOPENAI_API_KEY=your_openai_api_key_here\n```\n\nReplace `your_discord_token_here` with the actual token and `your_openai_api_key_here` with the actual API key.\n\n## Setting up the Knowledge Base\n\nThe bot relies on the Giveth's documentation as its knowledge base. The documentation is fetched from the Giveth's GitHub repository.\n\nUpon running the bot for the first time, it automatically clones the Giveth's documentation repository, if it doesn't already exist in the `giveth-docs` directory. If the repository already exists, it performs a git pull to fetch the latest documentation.\n\nThe bot then reads all markdown files from the repository, breaks the text into chunks, and generates embeddings for each chunk. The embeddings are used to perform a similarity search when a question is asked.\n\n## Running the Bot\n\nTo run the bot, simply execute the `main.py` script:\n\n```\npython main.py\n```\n\nThe bot then connects to your Discord server and is ready to accept commands.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fgiveth-docs-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiveth%2Fgiveth-docs-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fgiveth-docs-bot/lists"}