formatting code

This commit is contained in:
lanvent
2023-04-17 01:00:08 +08:00
parent 3b8972ce1f
commit 8f72e8c3e6
92 changed files with 1850 additions and 1188 deletions

View File

@@ -6,8 +6,10 @@ from bridge.bridge import Bridge
from bridge.context import Context
from bridge.reply import *
class Channel(object):
NOT_SUPPORT_REPLYTYPE = [ReplyType.VOICE, ReplyType.IMAGE]
def startup(self):
"""
init channel
@@ -27,15 +29,15 @@ class Channel(object):
send message to user
:param msg: message content
:param receiver: receiver channel account
:return:
:return:
"""
raise NotImplementedError
def build_reply_content(self, query, context : Context=None) -> Reply:
def build_reply_content(self, query, context: Context = None) -> Reply:
return Bridge().fetch_reply_content(query, context)
def build_voice_to_text(self, voice_file) -> Reply:
return Bridge().fetch_voice_to_text(voice_file)
def build_text_to_voice(self, text) -> Reply:
return Bridge().fetch_text_to_voice(text)