Skip to content

Conversation

@moon-strider
Copy link

Introducing the possibility to process audiofiles, voice messages, videofiles and video messasges in dp-agent using Telegram.

@moon-strider moon-strider self-assigned this Sep 5, 2023
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:
Copy link
Contributor

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?

Copy link
Author

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):
Copy link
Contributor

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.

Copy link
Author

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?

Comment on lines +16 to +22
app = app_factory(
cfg.agent.pipeline_config,
cfg.agent.db_config,
cfg.agent.debug,
cfg.agent.response_time_limit,
cfg.agent.cors
)
Copy link
Contributor

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.

Copy link
Author

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'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Author

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?

Comment on lines +15 to +21
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,
)
Copy link
Contributor

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.

Copy link
Author

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?

Comment on lines 26 to 27
"formatters_module": None,
"connectors_module": None,
Copy link
Contributor

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?

Copy link
Author

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?

@moon-strider moon-strider changed the base branch from dev to dev-2 September 20, 2023 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants