fix minor bugs

This commit is contained in:
qingxu fu
2023-09-03 16:20:05 +08:00
parent 79080290c6
commit 843113ba0f
4 changed files with 17 additions and 13 deletions

View File

@@ -43,6 +43,7 @@ PYDANTIC_FORMAT_INSTRUCTIONS_SIMPLE = """The output should be formatted as a JSO
{schema}
```"""
class JsonStringError(Exception): ...
class GptJsonIO():
@@ -105,6 +106,6 @@ class GptJsonIO():
except Exception as e:
# 没辙了,放弃治疗
logging.info('Repaire json fail.')
raise RuntimeError('Cannot repair json.', str(e))
raise JsonStringError('Cannot repair json.', str(e))
return result