{"id":25557228,"url":"https://github.com/lunaticpython2003/winassist","last_synced_at":"2025-09-01T10:09:10.251Z","repository":{"id":271221939,"uuid":"910305873","full_name":"LunaticPython2003/WinAssist","owner":"LunaticPython2003","description":"An interactive ChatBot with native interaction with Windows API ","archived":false,"fork":false,"pushed_at":"2025-01-16T06:58:29.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T07:38:58.311Z","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/LunaticPython2003.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}},"created_at":"2024-12-30T23:54:26.000Z","updated_at":"2025-01-16T06:58:30.000Z","dependencies_parsed_at":"2025-01-06T11:35:01.016Z","dependency_job_id":"7398923f-bbf6-422e-8526-5a37e3aaa892","html_url":"https://github.com/LunaticPython2003/WinAssist","commit_stats":null,"previous_names":["lunaticpython2003/winassist"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaticPython2003%2FWinAssist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaticPython2003%2FWinAssist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaticPython2003%2FWinAssist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaticPython2003%2FWinAssist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LunaticPython2003","download_url":"https://codeload.github.com/LunaticPython2003/WinAssist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859545,"owners_count":19708862,"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":"2025-02-20T14:58:24.205Z","updated_at":"2025-02-20T14:58:24.818Z","avatar_url":"https://github.com/LunaticPython2003.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\nAn interactive modular ChatBot assistant capable of handling a wide variety of user requests by branching tasks to specialized chains. The chains, built using Branching Chain architecture of LangChain process specific intents execute the required functions, and return the corresponding response to the user. Built with Flask and Python, the assistant has native access to the Windows APIs and integrates several features like system control, multimedia handling, and more.\n\n\n## Architecture\n\n### 1. **Input Handling**\n\n- User provides input through the chatbot interface.\n- Input is processed via a Flask API and sent to the central **`chat_service.py`** for classification.\n\n### 2. **Intent Recognition**\n\n- Intent recognition is performed using:\n  - A Language Model\n  - Rule-based fallback logic for straightforward tasks.\n- Identified intent determines the chain to execute.\n\n### 3. **Branching**\n\n- The input is routed to the appropriate chain based on the intent which includes system management controls using appropriate Windows APIs or nomral chat branch chain.\n- Check [Features](#features) for all the available branches that is currently available in the assistant, or are going to be available soon.  \u003cbr\u003e\n\u003ci\u003e \u003cb\u003e Note - The branches are not final and are subjected to future changes. \u003c/b\u003e \u003c/i\u003e\n\n### 4. **Chain Execution**\n\n- Each chain contains modularized service functions to process the task.\n- Functions interact with APIs, system commands, or databases as needed through thee corresponding services in `app/services`\n\n### 5. **Response Construction**\n\n- The chain returns the task result or an error message to the central service.\n- The chatbot constructs a user-friendly response and sends it back to the user.\n\n---\n\n## Features\n1. **System Control Chain**\n\n   - Turn on/off WiFi, Bluetooth, or adjust system volume.\n\n2. **Multimedia Control Chain**\n\n   - Control media playback (play, pause, volume adjustments, etc.).\n\n3. **Chatbot Interaction Chain**\n\n   - Answer general queries, tell jokes, or engage in small talk.\n\n4. **File Management Chain**\n\n   - Search for files, create folders, or manage documents.\n\n5. **Calendar and Scheduling Chain**\n\n   - Add events, check schedules, and set reminders.\n\n6. **Coding Chain**\n\n   - Generate and explain code, suggest libraries, refactor, translate code, as well as provide a comprehensive how-to guide for creating the project.\n\n7. **Semantic Search Chain**\n\n   - Retrieve relevant information from documents or knowledge bases.\n\n8. **Task Automation Chain**\n\n   - Automate repetitive processes like batch file renaming, create tasks in Task Schedular similar to creation of cron jobs, define and perform a function after every time duration specified.\n\n9. **Internet Related Chain**\n\n   - Search for resources on the internet, summarize the searched resources (in pdfs, docx, xlsx, etc), perform other information retrieval operations with proper citations, write/compose/read/draft emails, fetch news with fact appropriate fact checking and near zero bias.\n\n10. **Developer Tools Chain**\n\n    - Assist with developer-related tasks like debugging or running scripts, and finding and terminating errors in a code.\n\u003cbr\u003e\n---\n\n## WorkFlow\n[![](https://mermaid.ink/img/pako:eNqNlMFunDAQhl9l5NNWSl5gD5XaXUXtYdVW7KlxhSZ4AlawjYxJRFb77h3Aa7J0VcHF-J9_vhlg8EkUTpHYitJjU8FxLy3wpW3ThbwN_lGKLHhtS9h8H7RPUvyB-_vPUGCg0nn9TrlhQs3Gw7DCZpcikFIm6jJnBDXoW8pjqJ_qwc9B9LAZV4jEfiZdJ40cRYG80ZblCrU9SfHVoy0q2OwvEdgNEaacpZ04iyQGATfQt4EM7JwN3tVSjPh2FCfb49IzgVN3N6mHrg7akNK4IJsUSPR_vWsqsCU8ucBvnYNYBO1sLFFMkcS_4VxT4EHXBAe0WJIhGyL8mdXclGbGL3yresearEIPaBVkRUWqq3nqLv3H6PwAt-2rKjn1wTnhR2mGXzn-x8rIoA26gIzQF9VlVKI6D8u1bQ35iO0LfOmCM_jhOwZWE3VhWUP9hl69oSf41ZHvI7SKYgJfu9Zw9_RKtWv4jz06V7cRrOg1D8M-kRe-NegfoSIfgelUEnfCsBW14pPrNGRLwT5DUmz5lgfjRQppz-xDfkFZbwuxDb6jO-FdV1Zi-4x1y7uuUXyG7DXy8WeS2qD97dxlf_4LVPXCbQ?type=png)](https://mermaid.live/edit#pako:eNqNlMFunDAQhl9l5NNWSl5gD5XaXUXtYdVW7KlxhSZ4AlawjYxJRFb77h3Aa7J0VcHF-J9_vhlg8EkUTpHYitJjU8FxLy3wpW3ThbwN_lGKLHhtS9h8H7RPUvyB-_vPUGCg0nn9TrlhQs3Gw7DCZpcikFIm6jJnBDXoW8pjqJ_qwc9B9LAZV4jEfiZdJ40cRYG80ZblCrU9SfHVoy0q2OwvEdgNEaacpZ04iyQGATfQt4EM7JwN3tVSjPh2FCfb49IzgVN3N6mHrg7akNK4IJsUSPR_vWsqsCU8ucBvnYNYBO1sLFFMkcS_4VxT4EHXBAe0WJIhGyL8mdXclGbGL3yresearEIPaBVkRUWqq3nqLv3H6PwAt-2rKjn1wTnhR2mGXzn-x8rIoA26gIzQF9VlVKI6D8u1bQ35iO0LfOmCM_jhOwZWE3VhWUP9hl69oSf41ZHvI7SKYgJfu9Zw9_RKtWv4jz06V7cRrOg1D8M-kRe-NegfoSIfgelUEnfCsBW14pPrNGRLwT5DUmz5lgfjRQppz-xDfkFZbwuxDb6jO-FdV1Zi-4x1y7uuUXyG7DXy8WeS2qD97dxlf_4LVPXCbQ)\n\n**\u003cu\u003eInput Received\u003c/u\u003e**: The user message is sent to the Flask chatbot endpoint. \u003cbr\u003e\n**\u003cu\u003eIntent Recognition\u003c/u\u003e**: Intent identified as **`list_wifi_networks()`**. \u003cbr\u003e\n**\u003cu\u003eBranch to System Control Chain\u003c/u\u003e**: Task routed to the System Control Chain. \u003cbr\u003e\n**\u003cu\u003eExecute Function\u003c/u\u003e**: **`WifiService.list_wifi_networks()`** is called. \u003cbr\u003e\n**\u003cu\u003eResponse\u003c/u\u003e**: Success message returned: `\"WiFi has been turned on.\"`\n\n## Windows API integration\nTo reduce the dependency on third party packages and to achieve a greater level of system integration, system components have been written using the Win32 API which is then compiled into a DLL and then called using Python's `ctypes` library. The source code of all the functions are avaiilable in `app/services/libraries/source` directory. To compile the code into corresponding library, Microsoft's C++ Compiler (cl.exe) is used -\n```shell\ncl /LD bluetooth.cpp /link Bthprops.lib /Fe:bluetooth.dll\n```\nThis takes the bluetooth.cpp file as input, links it to Bthprops library and then generates a bluetooth.dll file that can be then be imported and used.\n\n### Note - The system currently only supports -\n- GPT4All Open Source Models: Models have to be exported to .gguf file in `app/models` directory\n- Groq AI: Just enter the Groq API Key in .env file and it will default to ChatGroq\n- Preliminary support for OpenAI and Anthropic coming in the next commit!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunaticpython2003%2Fwinassist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunaticpython2003%2Fwinassist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunaticpython2003%2Fwinassist/lists"}