{"id":47911276,"url":"https://github.com/etalab-ia/albert-tchap","last_synced_at":"2026-04-04T05:19:45.388Z","repository":{"id":234273625,"uuid":"788558333","full_name":"etalab-ia/albert-tchap","owner":"etalab-ia","description":"Bot for Tchap (the messaging app of the French State) using Albert, the French administration Artificial Intelligence agent","archived":false,"fork":false,"pushed_at":"2024-10-29T09:53:55.000Z","size":535,"stargazers_count":13,"open_issues_count":12,"forks_count":1,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2024-10-29T11:52:28.046Z","etag":null,"topics":["bot","llm","messaging"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etalab-ia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2024-04-18T16:44:37.000Z","updated_at":"2024-10-04T06:40:29.000Z","dependencies_parsed_at":"2024-06-13T14:14:07.875Z","dependency_job_id":"17b6c176-c366-4d99-8ceb-985545a4d434","html_url":"https://github.com/etalab-ia/albert-tchap","commit_stats":null,"previous_names":["etalab-ia/albert-tchapbot","etalab-ia/albert-tchap"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/etalab-ia/albert-tchap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etalab-ia%2Falbert-tchap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etalab-ia%2Falbert-tchap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etalab-ia%2Falbert-tchap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etalab-ia%2Falbert-tchap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etalab-ia","download_url":"https://codeload.github.com/etalab-ia/albert-tchap/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etalab-ia%2Falbert-tchap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bot","llm","messaging"],"created_at":"2026-04-04T05:19:43.855Z","updated_at":"2026-04-04T05:19:45.383Z","avatar_url":"https://github.com/etalab-ia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2023 Pôle d'Expertise de la Régulation Numérique \u003ccontact.peren@finances.gouv.fr\u003e\nSPDX-FileCopyrightText: 2024 Etalab \u003cetalab@modernisation.gouv.fr\u003e\n\nSPDX-License-Identifier: MIT\n--\u003e\n\n# Albert Tchap\n\n*[English version below](#english-version)*\n\n| \u003ca href=\"https://github.com/etalab-ia/albert\"\u003e\u003cb\u003eAlbert API sur GitHub\u003c/b\u003e\u003c/a\u003e | \u003ca href=\"https://huggingface.co/AgentPublic\"\u003e\u003cb\u003eModèles Albert sur HuggingFace\u003c/b\u003e\u003c/a\u003e |\n\n## Description du projet\n\nBot pour [Tchap, l'application de messagerie de l'administration française](https://tchap.beta.gouv.fr/).\nCe bot utilise [Albert](https://github.com/etalab-ia/albert), l'agent conversationnel (*large language models*, LLM) de l'administration française, pour répondre à des questions sur [Tchap, l'application de messagerie de l'administration française](https://tchap.beta.gouv.fr/).\n\nLe projet est un POC (Proof of Concept - preuve de concept) pour montrer comment un bot peut être utilisé pour répondre à des questions sur Tchap en utilisant Albert.\nIl s'agit d'un travail WIP (Work In Progress - en cours de développement) et n'est pas (encore) destiné à être utilisé en production.\n\nLe projet est un fork de [tchap_bot](https://code.peren.fr/open-source/tchapbot) qui est un bot Matrix pour Tchap, conçu par le [Pôle d'Expertise de la Régulation Numérique](https://www.peren.gouv.fr/). La partie bibliothèque (`matrix_bot`) est fortement inspirée de https://github.com/imbev/simplematrixbotlib.\n\nContient :\n- `app/.` : la codebase pour le Tchap bot Albert\n- `app/matrix_bot` : une bibliothèque qui encapsule [matrix-nio](https://github.com/matrix-nio/matrix-nio) faire des bots Matrix\n\n\n### Installation locale\n\nLe projet utilise un fichier de dépendances et de config `pyproject.toml` et non un fichier `requirements.txt`. Il est donc nécessaire d'utiliser `pip` en version 19.0 ou supérieure, ou bien avec un package manager comme `pdm`, `pip-tools`, `uv`, `rye`, `hatch` etc. (mais pas `poetry` qui n'utilise pas le standard `pyproject.toml`).\n\n```bash\n# Récupération du code avec Git\ngit clone ${GITHUB_URL}\n\n# Création d'un environnement virtuel Python\npython3 -m venv .venv\n\n# Activation de l'environnement virtuel Python\nsource .venv/bin/activate\n\n# Installation des dépendances\npip install .\n```\n\n\n### Configuration\n\nCréez le fichier d'environnement `app/.env` avec les informations de connexion (ou fournissez-les en variables d'environnement). Vous pouvez vous inspirer du fichier `app/.env.example` qui est initialisé avec les valeurs par défaut :\n```bash\ncp app/.env.example app/.env\n```\n\nL'ensemble des variables d'environements disponibles est documenté dans le fichier suivant : [app/config.py](./app/config.py)\n\n\n### Lancer le bot\n\nPour lancer le bot executez :\n```bash\npython app\n```\n\n#### NOTE 1\n\nCette commande stoppera surement si vous ne la lancez pas en mode sudo car\nelle installe par défault le data/store et le data/session.txt à la racine \"/\".\nVous pouvez lancer l'application pour qu'elle crée ces fichiers dans le dossier du projet directement avec la commande :\n\n```bash\nexport STORE_PATH='./data/store/' \u0026\u0026 export SESSION_PATH='./data/session.txt' \u0026\u0026 python app\n```\n\n#### NOTE 2\n\nSi vous voulez développez tout en faisant que le bot reload automatiquement, vous pouvez utiliser par exemple [nodemon](https://github.com/python-nodemon/nodemon) en module global python et lancer la commande suivante dans un terminal :\n\n```bash\nnodemon --watch app --ext py --exec \"export STORE_PATH='./data/store/' \u0026\u0026 export SESSION_PATH='./data/session.txt' \u0026\u0026 python app\"\n```\n\n#### NOTE 3\n\nSi vous voulez que vos messages engendrés par le bot se distinguent des autres messages, possiblement envoyé par d'autres bots (comme celui de staging):\n\n```bash\nnodemon --watch app --ext py --exec \"export MESSAGE_PREFIX='[DEV]' \u0026\u0026 export STORE_PATH='./data/store/' \u0026\u0026 export SESSION_PATH='./data/session.txt' \u0026\u0026 python app\"\n```\n\n#### NOTE 4\n\nSi vous voulez merger votre branche de dev pour la tester sur beta.tchap (branche staging) :\n\n```bash\ngit checkout staging\ngit merge \u003cyour-branch\u003e\ngit push origin staging\n```\n\n### Troubleshooting\n\nLe premier sync est assez long, et a priori non bloquant. Si vous avez une interaction avec le bot avant qu'il se soit bien sync vous risquez de le laisser dans un état instable (où le bot n'a pas le listing des rooms).\n\n\n### Contribution\n\nLe projet est en open source, sous [licence MIT](LICENSES/MIT.txt). Toutes les contributions sont bienvenues, sous forme de pull requests ou d'ouvertures d'issues sur le [repo officiel GitHub](https://github.com/etalab-ia/albert-tchapbot).\n\nPour commencer, consultez [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\n### Licence\n\nCe projet est sous licence MIT. Une copie intégrale du texte de la licence se trouve dans le fichier [`LICENSES/MIT.txt`](LICENSES/MIT.txt).\n\n\n---\n\n# English version\n\n\u003cdetails\u003e\n  \u003csummary\u003eEnglish version\u003c/summary\u003e\n\n\n| \u003ca href=\"https://github.com/etalab-ia/albert\"\u003e\u003cb\u003eAlbert API on GitHub\u003c/b\u003e\u003c/a\u003e | \u003ca href=\"https://huggingface.co/AgentPublic\"\u003e\u003cb\u003eAlbert models on HuggingFace\u003c/b\u003e\u003c/a\u003e |\n\n## Project Description\n\nBot for [Tchap, the French government messaging application](https://tchap.beta.gouv.fr/).\nThis bot uses [Albert](https://github.com/etalab-ia/albert), the conversational agent (large language models, LLM) of the French government, to answer questions about [Tchap](https://tchap.beta.gouv.fr/).\n\nThe project is a Proof of Concept (POC) to show how a bot can be used to answer questions about Tchap using Albert.\nIt is a Work In Progress (WIP) and is not (yet) intended for production use.\n\nThe project is a fork of [tchap_bot](https://code.peren.fr/open-source/tchapbot) which is a Matrix bot for Tchap, designed by the [Pôle d'Expertise de la Régulation Numérique](https://www.peren.gouv.fr/). The library part (`matrix_bot`) is heavily inspired by https://github.com/imbev/simplematrixbotlib.\n\nContains:\n- `app/.`: the codebase for the Albert Tchap bot\n- `app/matrix_bot`: a library that wraps [matrix-nio](https://github.com/matrix-nio/matrix-nio) to make Matrix bots\n\n\n### Local Installation\n\nThe project uses a dependencies and config file `pyproject.toml` and not a `requirements.txt` file. It is therefore necessary to use `pip` in version 19.0 or higher, or with a package manager like `pdm`, `pip-tools`, `uv`, `rye`, `hatch` etc. (but not `poetry` which does not use the standard `pyproject.toml`).\n\n```bash\n# Getting the code with Git\ngit clone ${GITHUB_URL}\n\n# Creating a Python virtual environment\npython3 -m venv .venv\n\n# Activating the Python virtual environment\nsource .venv/bin/activate\n\n# Installing dependencies\npip install .\n```\n\n### Configuration\n\nCreate the environment file `app/.env` with the connection information (or provide them as environment variables). You can use the `app/.env.example` file as inspiration, which is initialized with default values:\n```bash\ncp app/.env.example app/.env\n```\n\nThe set of available environment variables is documented in the following file: [app/config.py](./app/config.py)\n\n### Run the bot\n\nTo launch the bot:\n```bash\npython app\n```\n\n\n### Troubleshooting\n\nThe first sync is quite long, and apparently non-blocking. If you interact with the bot before it has synced properly, you risk leaving it in an unstable state (where the bot does not have the room listing).\n\n### Contribution\n\nThis project is open source, under the [MIT license](LICENSES/MIT.txt). All contributions are welcome, in the form of pull requests or issue openings on the [repo officiel GitHub](https://github.com/etalab-ia/albert-tchapbot).\n\nTo get started, take a look at [CONTRIBUTING.md](CONTRIBUTING.md).\n\n### License\n\nThis project is licensed under the MIT License. A full copy of the license text can be found in the `LICENSES/MIT.txt` file.\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetalab-ia%2Falbert-tchap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetalab-ia%2Falbert-tchap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetalab-ia%2Falbert-tchap/lists"}