{"id":19287909,"url":"https://github.com/deeppavlov/convai_router_bot_poller","last_synced_at":"2025-08-02T13:09:30.296Z","repository":{"id":37612027,"uuid":"155686674","full_name":"deeppavlov/convai_router_bot_poller","owner":"deeppavlov","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-21T22:51:45.000Z","size":82,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-23T23:28:13.659Z","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/deeppavlov.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}},"created_at":"2018-11-01T08:45:31.000Z","updated_at":"2022-09-13T18:28:24.000Z","dependencies_parsed_at":"2022-08-19T02:01:13.307Z","dependency_job_id":null,"html_url":"https://github.com/deeppavlov/convai_router_bot_poller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deeppavlov/convai_router_bot_poller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fconvai_router_bot_poller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fconvai_router_bot_poller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fconvai_router_bot_poller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fconvai_router_bot_poller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeppavlov","download_url":"https://codeload.github.com/deeppavlov/convai_router_bot_poller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fconvai_router_bot_poller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268393932,"owners_count":24243317,"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-02T02:00:12.353Z","response_time":74,"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-09T22:07:34.372Z","updated_at":"2025-08-02T13:09:30.274Z","avatar_url":"https://github.com/deeppavlov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConvAI Router Bot Poller (CRBP)\n\nIntegration tool which makes DeepPavlov agents accessible via ConvAI Router Bot\n\n## Installation\n1. Clone CRBP and `cd` to repository folder:\n    ```\n    git clone https://github.com/deepmipt/convai_router_bot_poller.git\n    cd convai_router_bot_poller\n    ```\n2. Create and activate Python 3.6 virtual environment:\n    ```\n    virtualenv env -p python3.6\n    source env/bin/activate\n    ```\n3.  Install dependencies:\n    ```\n    pip install -r requirements.txt\n    ```\n4. To start CRBP run:\n    ```\n    python poller.py [--model_url \u003cmodel_infer_url\u003e] \\\n                     [--host \u003crouter_bot_host\u003e] \\\n                     [--port \u003crouter_bot_port\u003e] \\\n                     [--token \u003cbot_token\u003e] \\\n                     [--state] \\\n                     [--convai] \\\n                     [--agent]\n    ```\n * `--model_url \u003cmodel_infer_url\u003e`: where to send POST-requests from the\n    [ConvAI Router Bot](https://github.com/deepmipt/convai_router_bot) for processing. Overrides default settings from `config.json`.\n * `--host \u003crouter_bot_host\u003e`: `ConvAI Router Bot` host address. Overrides default settings from `config.json`.\n * `--port \u003crouter_bot_port\u003e`: `ConvAI Router Bot` port. Overrides default settings from `config.json`.\n * `--token \u003cbot_token\u003e`: `ConvAI Router Bot` token. Overrides default settings from `config.json`.\n * `--state`: add this argument to send dialogue state besides utterance to model. Overrides default settings from `config.json`.\n * `--convai`: add this argument to send full payload to model instead of plain text. Overrides default settings from `config.json`.\n * `--agent`: add this argument to send utterances from router bot to web interface of `dp-agent`. Overrides default settings from `config.json`.\n \n\n## ConvAI Router Bot Poller modes\n\nOne can use 4 combinations of `convai` and `state` states while `agent` is set to `False`. `agent` mode could be\nset to `True` only when `convai` and `state` are set to `False`.\n\nIn `state` mode `CRBP` sends two argument batches: utterances batch and state batch. State could be `None` or any JSON structure.\nArgument names are stored at `config.json`.\n\nIn `convai` mode `CRBP` sends as utterance data received from [ConvAI Router Bot](https://github.com/deepmipt/convai_router_bot) as is.\nPayload structure could be seen in `_get_message_dict` function from\n[conversation_getaways](https://github.com/deepmipt/convai_router_bot/blob/master/convai/conversation_gateways.py) module.\nIn not `convai` mode `CRBP` sends only `text` field.\n\n| CRBP mode | request payload |\n|:---:|:---:|\n| `convai=False`, `state=False`, `agent=False` | `{'x': ['a', 'b']}` |\n| `convai=True`, `state=False`, `agent=False` | `{'x': [\u003cpayload_0\u003e, \u003cpayload_1\u003e]}` |\n| `convai=False`, `state=True`, `agent=False` | `{'x': ['a', 'b'], 'state': [\u003cstate_0\u003e, \u003cstate_1\u003e]}` |\n| `convai=True`, `state=True`, `agent=False` | `{'x': [\u003cpayload_0\u003e, \u003cpayload_1\u003e], 'state': [\u003cstate_0\u003e, \u003cstate_1\u003e]}` |\n| `convai=False`, `state=False`, `agent=True` | `{'user_id': 74455, 'payload': 'Hello, Agent!'}` |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeppavlov%2Fconvai_router_bot_poller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeppavlov%2Fconvai_router_bot_poller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeppavlov%2Fconvai_router_bot_poller/lists"}