-
Notifications
You must be signed in to change notification settings - Fork 25
Feat/telegram #128
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
base: dev-2
Are you sure you want to change the base?
Feat/telegram #128
Conversation
Release 2.2.0
* fix flake8 version * Create dp-agent.yml * fix linter warnings * add "black" code formatter * formatting source code * add "mypy" for static type checking * fix type errors
* is_enabled field support; pytest for unit tests * fix tests job
* move config parser to core module * fix type errors
* add service factory * fix flake8 * fix mypy
| async def handle_message(message: types.Message, state: FSMContext): | ||
| if await state.get_state() == DialogState.active.state: | ||
| message_attrs = {} | ||
| if message.photo and FILE_SERVER_URL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have you removed FILE_SERVER_URL existence check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was probably removed before me. This pr is based on an old branch of unknown origin. Readded
| self.services_names[name].add(name) | ||
|
|
||
| logger.debug(f"Create service: '{name}' config={node.config}") | ||
| def make_connector(self, name: str, data: Dict): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? We already have deeppavlov_agent.core.connectors.make_connector.
Also, your code below is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change that file, it was like that in the origin I forked from. Do you want me to make changes in all such files?
| app = app_factory( | ||
| cfg.agent.pipeline_config, | ||
| cfg.agent.db_config, | ||
| cfg.agent.debug, | ||
| cfg.agent.response_time_limit, | ||
| cfg.agent.cors | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? BTW, doesn't fit app_factory signature, since you keep it without changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change that file, it was like that in the origin I forked from. Do you want me to make changes in all such files?
|
|
||
| logger = getLogger(__name__) | ||
| sentry_sdk.init(os.getenv("DP_AGENT_SENTRY_DSN")) # type: ignore | ||
| sentry_sdk.init(os.getenv('DP_AGENT_SENTRY_DSN')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change that file, it was like that in the origin I forked from. Do you want me to make changes in all such files?
| agent, session, workers = setup_agent( | ||
| cfg.agent.pipeline_config, | ||
| cfg.agent.db_config, | ||
| cfg.agent.overwrite_last_chance, | ||
| cfg.agent.overwrite_timeout, | ||
| cfg.agent.response_logger, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Doesn't fit setup_agent signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change that file, it was like that in the origin I forked from. Do you want me to make changes in all such files?
| "formatters_module": None, | ||
| "connectors_module": None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Where is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change that file, it was like that in the origin I forked from. Do you want me to make changes in all such files?
Co-authored-by: Fedor Ignatov <[email protected]>
Introducing the possibility to process audiofiles, voice messages, videofiles and video messasges in dp-agent using Telegram.