Do not return "'none'" from parse_maybe_json.
This commit is contained in:
parent
d29595136f
commit
79fc0d6cba
@ -47,7 +47,10 @@ def parse_maybe_json(json_string):
|
||||
concatenated_values.append(str(value))
|
||||
return '\n'.join(concatenated_values)
|
||||
|
||||
return str(parsed_json)
|
||||
result = str(parsed_json)
|
||||
if result.lower() in ('', 'none', 'null', '"none"', '"null"', "'none'", "'null'"):
|
||||
return None
|
||||
return result
|
||||
|
||||
|
||||
class AIMessageBase(object):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user