mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-23 01:49:58 +00:00
feat(agent): Multi agent sdk (#976)
Co-authored-by: xtyuns <xtyuns@163.com> Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: csunny <cfqsunny@163.com> Co-authored-by: qidanrui <qidanrui@gmail.com>
This commit is contained in:
@@ -73,6 +73,15 @@ def extract_content_open_ending(long_string, s1, s2, is_include: bool = False):
|
||||
return match_map
|
||||
|
||||
|
||||
def str_to_bool(s):
|
||||
if s.lower() in ("true", "t", "1", "yes", "y"):
|
||||
return True
|
||||
elif s.lower() in ("false", "f", "0", "no", "n"):
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def _to_str(x, charset="utf8", errors="strict"):
|
||||
if x is None or isinstance(x, str):
|
||||
return x
|
||||
|
Reference in New Issue
Block a user