Skip to content

Commit

Permalink
fix scene base 'of_mode' error (#881)
Browse files Browse the repository at this point in the history
Co-authored-by: jcfwwangxun_qm <jcfwwangxun_qm@faw.com.cn>
  • Loading branch information
quqibing and jcfwwangxun_qm authored Dec 2, 2023
1 parent a35b612 commit 13fb9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pilot/scene/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ChatScene(Enum):

@staticmethod
def of_mode(mode):
return [x for x in ChatScene._value_ if x.code == mode][0]
return [x for x in ChatScene if mode == x.value()][0]

@staticmethod
def is_valid_mode(mode):
Expand Down

0 comments on commit 13fb9d0

Please sign in to comment.