mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-15 05:59:59 +00:00
fix scene base 'of_mode' error (#881)
Co-authored-by: jcfwwangxun_qm <jcfwwangxun_qm@faw.com.cn>
This commit is contained in:
@@ -109,7 +109,7 @@ class ChatScene(Enum):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def of_mode(mode):
|
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
|
@staticmethod
|
||||||
def is_valid_mode(mode):
|
def is_valid_mode(mode):
|
||||||
|
Reference in New Issue
Block a user