Skip to content

Commit

Permalink
fix: group voice config and azure model calc support
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Jul 1, 2023
1 parent 973acb3 commit 709b5be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot/chatgpt/chat_gpt_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def num_tokens_from_messages(messages, model):

if model in ["gpt-3.5-turbo-0301", "gpt-35-turbo"]:
return num_tokens_from_messages(messages, model="gpt-3.5-turbo")
elif model in ["gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0613", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613"]:
elif model in ["gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0613", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-35-turbo-16k"]:
return num_tokens_from_messages(messages, model="gpt-4")

try:
Expand Down
2 changes: 1 addition & 1 deletion channel/wechat/wechat_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def handle_single(self, cmsg: ChatMessage):
@_check
def handle_group(self, cmsg: ChatMessage):
if cmsg.ctype == ContextType.VOICE:
if conf().get("speech_recognition") != True:
if conf().get("group_speech_recognition") != True:
return
logger.debug("[WX]receive voice for group msg: {}".format(cmsg.content))
elif cmsg.ctype == ContextType.IMAGE:
Expand Down

0 comments on commit 709b5be

Please sign in to comment.