{"id":28165782,"url":"https://github.com/davidar/deepbot","last_synced_at":"2025-07-23T13:11:38.002Z","repository":{"id":282640669,"uuid":"941475923","full_name":"davidar/deepbot","owner":"davidar","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-06T10:01:41.000Z","size":463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T11:18:49.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/davidar.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,"zenodo":null}},"created_at":"2025-03-02T11:39:05.000Z","updated_at":"2025-06-06T10:01:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f700bbb-9cb1-4f4a-9145-088be707ea35","html_url":"https://github.com/davidar/deepbot","commit_stats":null,"previous_names":["davidar/deepbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidar/deepbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidar%2Fdeepbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidar%2Fdeepbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidar%2Fdeepbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidar%2Fdeepbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidar","download_url":"https://codeload.github.com/davidar/deepbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidar%2Fdeepbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266682672,"owners_count":23967837,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2025-05-15T12:12:10.669Z","updated_at":"2025-07-23T13:11:37.840Z","avatar_url":"https://github.com/davidar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepBot - Discord Bot with Local LLM Integration\n\nA Discord bot that uses a local LLM API to generate streaming responses based on conversation history.\n\n## Setup\n\n1. Run the setup script to create a virtual environment and install dependencies:\n   ```\n   python setup.py\n   ```\n\n2. Create a `.env` file with the following variables:\n   ```\n   DISCORD_TOKEN=your_discord_bot_token\n   ```\n\n3. Run the bot:\n   ```\n   python bot.py\n   ```\n\n## Service Management (Linux)\n\nOn Linux systems, the setup script automatically configures a systemd user service. Here's how to manage it:\n\n### Enable Service to Run Without Login\n```bash\n# Enable lingering for your user to allow the service to run without being logged in\nsudo loginctl enable-linger $USER\n\n# Verify lingering is enabled\nloginctl show-user $USER | grep Linger\n```\n\n### Basic Service Commands\n```bash\n# Enable the service to start on boot\nsystemctl --user enable deepbot.service\n\n# Start the service\nsystemctl --user start deepbot.service\n\n# Stop the service\nsystemctl --user stop deepbot.service\n\n# Restart the service\nsystemctl --user restart deepbot.service\n\n# Check service status\nsystemctl --user status deepbot.service\n```\n\n### Viewing Logs\n```bash\n# View recent logs\njournalctl --user-unit deepbot.service\n\n# Follow logs in real-time\njournalctl --user-unit deepbot.service -f\n\n# View logs since last boot\njournalctl --user-unit deepbot.service -b\n\n# View logs with timestamps\njournalctl --user-unit deepbot.service --output=short-precise\n```\n\n### Troubleshooting\n- If the service fails to start, check logs using the commands above\n- Ensure the `.env` file is properly configured\n- Verify Ollama is running and accessible\n- Check permissions on the bot directory and files\n- Run `systemctl --user daemon-reload` after making changes to the service file\n\n## Configuration\n\nThe bot's configuration is split between environment variables and a JSON configuration file:\n\n### Environment Variables (`.env`)\n- `DISCORD_TOKEN`: Your Discord bot token\n\n### API Configuration (`config.py`)\n- `API_URL`: URL of the Ollama API (default: http://localhost:11434)\n- `MODEL_NAME`: Name of the model to use (default: mistral-small)\n\n### Model Options (`model_options.json`)\nThe bot's behavior can be customized by modifying the options in `model_options.json`:\n\n- `temperature`: Controls randomness in responses (0.0 to 1.0)\n- `max_tokens`: Maximum tokens to generate (-1 for unlimited)\n- `top_p`: Top-p sampling parameter (0.0 to 1.0)\n- `presence_penalty`: Penalty for token presence (0.0 to 1.0)\n- `frequency_penalty`: Penalty for token frequency (0.0 to 1.0)\n- `seed`: Random seed for generation (-1 for random)\n- `max_history`: Maximum number of messages to keep in conversation history\n- `history_fetch_limit`: Maximum number of messages to fetch from channel history on startup\n- `max_response_lines`: Maximum number of lines in bot responses\n- `max_prompt_lines`: Maximum number of lines in user prompts\n\n## Creating a Discord Bot\n\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)\n2. Click \"New Application\" and give it a name\n3. Go to the \"Bot\" tab and click \"Add Bot\"\n4. Under \"Privileged Gateway Intents\", enable \"Message Content Intent\"\n5. Copy the token and add it to your `.env` file\n6. Go to the \"OAuth2\" tab, then \"URL Generator\"\n7. Select the \"bot\" scope and the following permissions:\n   - Read Messages/View Channels\n   - Send Messages\n   - Read Message History\n8. Use the generated URL to invite the bot to your server\n\n---\n\n*Created [by AI](https://docs.cursor.com/agent) — [for AI](https://mistral.ai/en/news/mistral-small-3).*\n[**Disclaimer.**](https://en.wikipedia.org/wiki/Vibe_coding)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidar%2Fdeepbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidar%2Fdeepbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidar%2Fdeepbot/lists"}