Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove: telegram, msbot, alexa, alice connectors #1548

Merged
merged 6 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 2 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ Please leave us [your feedback](https://forms.gle/i64fowQmiVhMMC7f9) on how we c

**Integrations**

[REST API](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html) | [Socket API](http://docs.deeppavlov.ai/en/master/integrations/socket_api.html) | [Yandex Alice](http://docs.deeppavlov.ai/en/master/integrations/yandex_alice.html)
[REST API](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html) | [Socket API](http://docs.deeppavlov.ai/en/master/integrations/socket_api.html)

[Telegram](http://docs.deeppavlov.ai/en/master/integrations/telegram.html) | [Microsoft Bot Framework](http://docs.deeppavlov.ai/en/master/integrations/ms_bot.html)

[Amazon Alexa](http://docs.deeppavlov.ai/en/master/integrations/amazon_alexa.html) | [Amazon AWS](http://docs.deeppavlov.ai/en/master/integrations/aws_ec2.html)
[Amazon AWS](http://docs.deeppavlov.ai/en/master/integrations/aws_ec2.html)

## Installation

Expand Down Expand Up @@ -170,10 +168,6 @@ python -m deeppavlov <action> <config_path> [-d]
* `interact` to interact via CLI,
* `riseapi` to run a REST API server (see
[doc](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html)),
* `telegram` to run as a Telegram bot (see
[doc](http://docs.deeppavlov.ai/en/master/integrations/telegram.html)),
* `msbot` to run a Miscrosoft Bot Framework server (see
[doc](http://docs.deeppavlov.ai/en/master/integrations/ms_bot.html)),
* `predict` to get prediction for samples from *stdin* or from
*<file_path>* if `-f <file_path>` is specified.
* `<config_path>` specifies path (or name) of model's config file
Expand Down Expand Up @@ -226,78 +220,6 @@ from deeppavlov import evaluate_model
model = evaluate_model(<config_path>, download=True)
```

IgnatovFedor marked this conversation as resolved.
Show resolved Hide resolved
There are also available integrations with various messengers, see
[Telegram Bot doc page](http://docs.deeppavlov.ai/en/master/integrations/telegram.html)
and others in the Integrations section for more info.


## Breaking Changes

**Breaking changes in version 0.15.0**
- [bert_as_summarizer](https://github.com/deepmipt/DeepPavlov/pull/1391), [seq2seq_go_bot](https://github.com/deepmipt/DeepPavlov/pull/1434) and all deeppavlov.deprecated components were removed
- hyperparameter optimization by neural evolution was [removed](https://github.com/deepmipt/DeepPavlov/pull/1436)

**Breaking changes in version 0.7.0**
- in dialog logger config file [dialog_logger_config.json](deeppavlov/utils/settings/dialog_logger_config.json) `agent_name` parameter was renamed to `logger_name`,
the default value was changed
- Agent, Skill, eCommerce Bot and Pattern Matching classes were moved to [deeppavlov.deprecated](deeppavlov/deprecated)
- [AIML Skill](http://docs.deeppavlov.ai/en/0.7.0/features/skills/aiml_skill.html),
[RASA Skill](http://docs.deeppavlov.ai/en/0.7.0/features/skills/rasa_skill.html),
[Yandex Alice](http://docs.deeppavlov.ai/en/0.7.0/integrations/yandex_alice.html),
[Amazon Alexa](http://docs.deeppavlov.ai/en/0.7.0/integrations/amazon_alexa.html),
[Microsoft Bot Framework](http://docs.deeppavlov.ai/en/0.7.0/integrations/ms_bot.html) and
[Telegram integration](http://docs.deeppavlov.ai/en/0.7.0/integrations/telegram.html) interfaces were changed
- `/start` and `/help` Telegram messages were moved from `models_info.json` to [server_config.json](deeppavlov/utils/settings/server_config.json)
- [risesocket](http://docs.deeppavlov.ai/en/0.7.0/integrations/socket_api.html) request and response format was changed
- [riseapi](http://docs.deeppavlov.ai/en/0.7.0/integrations/rest_api.html#advanced-configuration) and
[risesocket](http://docs.deeppavlov.ai/en/0.7.0/integrations/socket_api.html#advanced-configuration) model-specific
properties parametrization was changed

**Breaking changes in version 0.6.0**
- [REST API](http://docs.deeppavlov.ai/en/0.6.0/integrations/rest_api.html):
- all models default endpoints were renamed to `/model`
- by default model arguments names are taken from `chainer.in`
[configuration parameter](http://docs.deeppavlov.ai/en/0.6.0/intro/configuration.html) instead of pre-set names
from a [settings file](http://docs.deeppavlov.ai/en/0.6.0/integrations/settings.html)
- swagger api endpoint moved from `/apidocs` to `/docs`
- when using `"max_proba": true` in
a [`proba2labels` component](http://docs.deeppavlov.ai/en/0.6.0/apiref/models/classifiers.html) for classification,
it will return single label for every batch element instead of a list. One can set `"top_n": 1`
to get batches of single item lists as before

**Breaking changes in version 0.5.0**
- dependencies have to be reinstalled for most pipeline configurations
- models depending on `tensorflow` require `CUDA 10.0` to run on GPU instead of `CUDA 9.0`
- scikit-learn models have to be redownloaded or retrained

**Breaking changes in version 0.4.0!**
- default target variable name for [neural evolution](https://docs.deeppavlov.ai/en/0.4.0/intro/hypersearch.html#parameters-evolution-for-deeppavlov-models)
was changed from `MODELS_PATH` to `MODEL_PATH`.

**Breaking changes in version 0.3.0!**
- component option `fit_on_batch` in configuration files was removed and replaced with adaptive usage of the `fit_on` parameter.

**Breaking changes in version 0.2.0!**
- `utils` module was moved from repository root in to `deeppavlov` module
- `ms_bot_framework_utils`,`server_utils`, `telegram utils` modules was renamed to `ms_bot_framework`, `server` and `telegram` correspondingly
- rename metric functions `exact_match` to `squad_v2_em` and `squad_f1` to `squad_v2_f1`
- replace dashes in configs name with underscores

**Breaking changes in version 0.1.0!**
- As of `version 0.1.0` all models, embeddings and other downloaded data for provided configurations are
by default downloaded to the `.deeppavlov` directory in current user's home directory.
This can be changed on per-model basis by modifying
a `ROOT_PATH` [variable](http://docs.deeppavlov.ai/en/master/intro/configuration.html#variables)
or related fields one by one in model's configuration file.

- In configuration files, for all features/models, dataset readers and iterators `"name"` and `"class"` fields are combined
into the `"class_name"` field.

- `deeppavlov.core.commands.infer.build_model_from_config()` was renamed to `build_model` and can be imported from the
`deeppavlov` module directly.

- The way arguments are passed to metrics functions during training and evaluation was changed and
[documented](http://docs.deeppavlov.ai/en/0.4.0/intro/config_description.html#metrics).

## License

Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/classifiers/query_pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
"MODEL_PATH": "{MODELS_PATH}/classifiers/query_prediction"
},
"labels": {
"telegram_utils": "IntentModel",
"server_utils": "KerasIntentModel"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq_bert_ranker.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq_mt_bert.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@
"MT_BERT_PATH": "{MODELS_PATH}/mt_bert_kbqa"
},
"labels": {
"telegram_utils": "KBQA_MT_BERT_MODEL",
"server_utils": "KBQA"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq_online.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq_online_mt_bert.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@
"MT_BERT_PATH": "{MODELS_PATH}/mt_bert_kbqa"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq_rus.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/kbqa/kbqa_cq_sep.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"CONFIGS_PATH": "{DEEPPAVLOV_PATH}/configs"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/ner/ner_bert_ent_and_type_rus.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"NER_PATH": "{MODELS_PATH}/ner_ent_and_type_rus"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/configs/ner/ner_lcquad_bert_ent_and_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"NER_PATH": "{MODELS_PATH}/ner_lcquad_ent_and_type"
},
"labels": {
"telegram_utils": "NERCoNLL2003Model",
"server_utils": "NER"
},
"download": [
Expand Down
35 changes: 2 additions & 33 deletions deeppavlov/deep.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@
from deeppavlov.core.common.file import find_config
from deeppavlov.download import deep_download
from deeppavlov.utils.agent import start_rabbit_service
from deeppavlov.utils.alexa import start_alexa_server
from deeppavlov.utils.alice import start_alice_server
from deeppavlov.utils.ms_bot_framework import start_ms_bf_server
from deeppavlov.utils.pip_wrapper import install_from_config
from deeppavlov.utils.server import start_model_server
from deeppavlov.utils.socket import start_socket_server
from deeppavlov.utils.telegram import interact_model_by_telegram

log = getLogger(__name__)

parser = argparse.ArgumentParser()

parser.add_argument("mode", help="select a mode, train or interact", type=str,
choices={'train', 'evaluate', 'interact', 'predict', 'telegram', 'msbot', 'alexa', 'alice',
'riseapi', 'risesocket', 'agent-rabbit', 'download', 'install', 'crossval'})
choices={'train', 'evaluate', 'interact', 'predict', 'riseapi', 'risesocket', 'agent-rabbit',
'download', 'install', 'crossval'})
parser.add_argument("config_path", help="path to a pipeline json config", type=str)

parser.add_argument("-e", "--start-epoch-num", dest="start_epoch_num", default=None,
Expand All @@ -48,11 +44,6 @@

parser.add_argument("--folds", help="number of folds", type=int, default=5)

parser.add_argument("-t", "--token", default=None, help="telegram bot token", type=str)

parser.add_argument("-i", "--ms-id", default=None, help="microsoft bot framework app id", type=str)
parser.add_argument("-s", "--ms-secret", default=None, help="microsoft bot framework app secret", type=str)

parser.add_argument("--https", action="store_true", default=None, help="run model in https mode")
parser.add_argument("--key", default=None, help="ssl key", type=str)
parser.add_argument("--cert", default=None, help="ssl certificate", type=str)
Expand Down Expand Up @@ -87,28 +78,6 @@ def main():
train_evaluate_model_from_config(pipeline_config_path, to_train=False, start_epoch_num=args.start_epoch_num)
elif args.mode == 'interact':
interact_model(pipeline_config_path)
elif args.mode == 'telegram':
interact_model_by_telegram(model_config=pipeline_config_path, token=args.token)
elif args.mode == 'msbot':
start_ms_bf_server(model_config=pipeline_config_path,
app_id=args.ms_id,
app_secret=args.ms_secret,
port=args.port,
https=args.https,
ssl_key=args.key,
ssl_cert=args.cert)
elif args.mode == 'alexa':
start_alexa_server(model_config=pipeline_config_path,
port=args.port,
https=args.https,
ssl_key=args.key,
ssl_cert=args.cert)
elif args.mode == 'alice':
start_alice_server(model_config=pipeline_config_path,
port=args.port,
https=args.https,
ssl_key=args.key,
ssl_cert=args.cert)
elif args.mode == 'riseapi':
start_model_server(pipeline_config_path, args.https, args.key, args.cert, port=args.port)
elif args.mode == 'risesocket':
Expand Down
1 change: 0 additions & 1 deletion deeppavlov/utils/alexa/__init__.py

This file was deleted.

94 changes: 0 additions & 94 deletions deeppavlov/utils/alexa/request_parameters.py

This file was deleted.

Loading